logson 1.0.0 → 1.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7ade71bf785adfa100315eb6298c2ae59805a3f685e47f270c1894798d9ff3cb
4
- data.tar.gz: 954611e9e0fd4a63aa65afa815490ac3c5f9cee8cf7818c436c4483c21f2ae72
3
+ metadata.gz: e629e93dfea067201b37a063c6a5f6042c462482af9bcc701968d431874db8c5
4
+ data.tar.gz: 7524f3cd18c3cdfea2268f919e42cacde3ec002c8baf70201a04b04c360ce89c
5
5
  SHA512:
6
- metadata.gz: b8e9b9c409cd8530582bdaab1b0514db9ade256bac0d59881e7ce6d3f1747c06c950258abca33f6f5b63deaa8c933ed456fc1a3112df75ce35cb2d34809700f7
7
- data.tar.gz: 510c87e50e163d5047d3338885f47434e9c3ac5f28507c6cca3b50c265ecb46d5905754637f31d908152b26274184c957285be136cb95963aa203acc2d406866
6
+ metadata.gz: 1c77105286f9bf97d8b28a1dfa925690925afa020c536b049735599523e3e42b2b47e3492ab6433e456b17428baedfab78b993e952dd76968d5c1983cbb98685
7
+ data.tar.gz: fb34045f4ac28eb3301f2c89c0f9a801c4b5fa53f2f70b1734d673a75f04b2e438ea45de244f682d41da5d66a1d70c52723d184faab0da58bfa999c5bbdd4e8e
data/.gitignore CHANGED
@@ -6,6 +6,7 @@
6
6
  /pkg/
7
7
  /spec/reports/
8
8
  /tmp/
9
+ /*.gem
9
10
 
10
11
  # rspec failure tracking
11
12
  .rspec_status
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- logson (1.0.0)
4
+ logson (1.1.2)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -4,7 +4,6 @@ require 'logger'
4
4
  require 'json'
5
5
  require 'logson/version'
6
6
  require 'logson/logger'
7
- require 'logson/railties/logging_instrumentation'
8
7
 
9
8
  module Logson
10
9
  end
@@ -4,8 +4,9 @@ module Logson
4
4
 
5
5
  def initialize(*args)
6
6
  super(*args)
7
+
7
8
  self.hostname = Socket.gethostname
8
- self.formatter = proc do |severity, date, progname, msg|
9
+ self.formatter = lambda do |severity, date, progname, msg|
9
10
  date = date.utc.iso8601 if date.is_a?(Time)
10
11
  data = {
11
12
  '_severity' => severity, '_date' => date, '_source' => progname,
@@ -16,8 +17,8 @@ module Logson
16
17
  else
17
18
  data['message'] = msg
18
19
  end
19
- date.to_s + ' ' + JSON.dump(data) + "\n"
20
- end
20
+ JSON.dump(data) + "\n"
21
+ end.freeze
21
22
  end
22
23
 
23
24
  def source=(value)
@@ -0,0 +1 @@
1
+ require 'logson/railties/logging_instrumentation'
@@ -1,3 +1,3 @@
1
1
  module Logson
2
- VERSION = '1.0.0'
2
+ VERSION = '1.1.2'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logson
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Julien D.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-09-18 00:00:00.000000000 Z
11
+ date: 2019-01-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -72,6 +72,7 @@ files:
72
72
  - bin/setup
73
73
  - lib/logson.rb
74
74
  - lib/logson/logger.rb
75
+ - lib/logson/railties.rb
75
76
  - lib/logson/railties/logging_instrumentation.rb
76
77
  - lib/logson/version.rb
77
78
  - logson.gemspec