alephant-logger-json 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/alephant/logger/json.rb +2 -1
- data/lib/alephant/logger/json/version.rb +1 -1
- data/spec/alephant/logger/json_spec.rb +1 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3968d465458c83d5311c94efbca73fc9d51573cf
|
4
|
+
data.tar.gz: a132988fc00b3aafc4e504be158512de6e903f5f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 22d2e4a1564a559732dd57b738944b969b3cc73c3341c0fd1c69dc364acfb0bd7e3b9eaff853b7049cba1aa6e136e98a53139eb8538265dd4c237d0b23c32cfd
|
7
|
+
data.tar.gz: f7485a3235e148c99eeefb6b5116886b6840bb9e9121e15dd2cb876b33428deaaa83fa61645fe34f8a9ce678e2df90340b8d2557a6509d287f32f5eae0c98bb1
|
data/lib/alephant/logger/json.rb
CHANGED
@@ -5,11 +5,12 @@ module Alephant
|
|
5
5
|
class JSON
|
6
6
|
def initialize(log_path)
|
7
7
|
@log_file = File.open(log_path, "a+")
|
8
|
+
@log_file.sync = true
|
8
9
|
end
|
9
10
|
|
10
11
|
[:debug, :info, :warn, :error].each do |level|
|
11
12
|
define_method(level) do |hash|
|
12
|
-
hash["level"] = level
|
13
|
+
hash["level"] = level.to_s
|
13
14
|
@log_file.write(::JSON.generate(hash) + "\n")
|
14
15
|
end
|
15
16
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: alephant-logger-json
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dan Arnould
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-04-
|
11
|
+
date: 2015-04-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|