contextual_logger 0.9.0.pre.1 → 0.9.0

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: 7396d052ab45c9e40375f045cac2ae2dffa8e0a74b964b61252f5dca8a8500f9
4
- data.tar.gz: 1f6e1299b3ad104625fc0537259c5fab051230bf03d528961be518119b23b8b4
3
+ metadata.gz: e9f52753d4acdf8c75e8c94154a8002490e88ccc0201bf6623d6b47a2c65791f
4
+ data.tar.gz: 304de20b917e9c4078dc83ce96867f44af03d9adbf95e18091e3987e17cabcaa
5
5
  SHA512:
6
- metadata.gz: 6649c29d562f319d8c8360ee6016b0b1bde30f07856c03c3f5c97f151a591b5784c4f74488253f6b4afd7c2f3419c857fef8b96b36be2e187fc12cf657d8a6d9
7
- data.tar.gz: 318dbefabf79b8ad34db1aa268d4e930879883ae74c72b05f417e25267ee042a50711688210abfc7b31dc09698b40dbb524d95df59ea463d02d09101928a8948
6
+ metadata.gz: 5b3e5489d812a5dc8885a43f92d631a3d99ce3d1a5f7cb631ed16b2457cc2793f4c9ec72d91c09121db047cb83eac3f807db2a722e2481bfc4a39cf85cd12970
7
+ data.tar.gz: 78e344d513e2c04ccfa545cc492a514af7d90bf06c335ee80629c10be87339db3004e3fa9d9c801c327d3b4af6af7eec48ece482e05519da7b55cd1a052bd480
@@ -136,18 +136,20 @@ module ContextualLogger
136
136
  if @formatter
137
137
  @formatter.call(severity, timestamp, progname, { message: ContextualLogger.normalize_message(message), **context })
138
138
  else
139
- "#{basic_message_formatting(severity, timestamp, progname, message, context: context).to_json}\n"
139
+ "#{basic_json_log_entry(severity, timestamp, progname, message, context: context)}\n"
140
140
  end
141
141
  end
142
142
 
143
- def basic_message_formatting(severity, timestamp, progname, message, context:)
143
+ def basic_json_log_entry(severity, timestamp, progname, message, context:)
144
144
  message_hash = {
145
145
  message: ContextualLogger.normalize_message(message),
146
146
  severity: severity,
147
147
  timestamp: timestamp
148
148
  }
149
149
  message_hash[:progname] = progname if progname
150
- message_hash.merge(context)
150
+
151
+ # using merge! instead of merge for speed of operation
152
+ message_hash.merge!(context).to_json
151
153
  end
152
154
  end
153
155
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ContextualLogger
4
- VERSION = '0.9.0.pre.1'
4
+ VERSION = '0.9.0'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: contextual_logger
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0.pre.1
4
+ version: 0.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Ebentier
@@ -67,9 +67,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
67
67
  version: '0'
68
68
  required_rubygems_version: !ruby/object:Gem::Requirement
69
69
  requirements:
70
- - - ">"
70
+ - - ">="
71
71
  - !ruby/object:Gem::Version
72
- version: 1.3.1
72
+ version: '0'
73
73
  requirements: []
74
74
  rubygems_version: 3.0.3
75
75
  signing_key: