threaded_logging 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/threaded_logging.rb +3 -2
  3. metadata +3 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1ec9733e11478c13830611b92a9676a4d534f249
4
- data.tar.gz: 7e3ce87497d022a55785d1cc63747607177b339c
3
+ metadata.gz: 43c5a2fcc786291de3cfbe4f27daf182d720dcfe
4
+ data.tar.gz: 3bf35551662d69cc088fc7084aa759aa549c7ffc
5
5
  SHA512:
6
- metadata.gz: 280f819d54e600486614a4c6eaf2103b785783aaa8ae7bab3cba45543c18947656c26563178af7fdb971d9b916b73779d62d433e58f496b9874e38ab1e8a82de
7
- data.tar.gz: 049cc10cff63319955141b368dafa3ce96f93bd5da5bc1118a663013cb045a942c53eacf22a46518050e299df40debddc65a041a505b5b8d32d935d7cc65b275
6
+ metadata.gz: e5d8f8841d46b9d15fbd7eb108a58e458c6d567b7258de6c66328fd37ab933524ea3989e39f4614e16deeacb082b65d440d0c3169cb220db35216bfd099c6418
7
+ data.tar.gz: 8a6bc21b4129c5f2e3a8bcf3b7bfefb90e9b31c545a7cdca4dfee445aef6123f6a02e2172148676a558b59b9a8475735cf06ebfb98bec9b53a079d9dead484ba
@@ -2,12 +2,13 @@ require "English"
2
2
 
3
3
  module ThreadedLogging
4
4
  def call(severity, time, _progname, msg)
5
- time_string = time.strftime("%Y-%m-%dT%H:%M:%S.") << format("%06d", time.usec)
5
+ time_string = time.strftime("%Y-%m-%dT%H:%M:%S.%6N")
6
6
  thread_id = Digest::MD5.hexdigest([Thread.current.object_id, $PID].join)[0...8]
7
7
 
8
8
  metadata = "#{severity[0]} [#{time_string}] ##{thread_id}:"
9
+
9
10
  message = ""
10
- msg.lines.each { |line| message << "#{metadata} #{line}" }
11
+ msg.to_s.lines.each { |line| message << "#{metadata} #{line}" }
11
12
  "#{message}\n"
12
13
  end
13
14
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: threaded_logging
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yuri Smirnov
@@ -37,9 +37,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
37
37
  version: '0'
38
38
  requirements: []
39
39
  rubyforge_project:
40
- rubygems_version: 2.5.1
40
+ rubygems_version: 2.6.7
41
41
  signing_key:
42
42
  specification_version: 4
43
- summary: Better formatter for rails logger
43
+ summary: Better formatter for ruby loggers
44
44
  test_files: []
45
- has_rdoc: