testa_logger 0.1.17 → 0.1.20

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: dfd803d381aec073541589279ce2694765b9b3f523d945b73dfa208bc6a57f1d
4
- data.tar.gz: 43e6b677000f40c5bb1dd26a0d759ff73e5e7d2e1190c9488ed022168e05b830
3
+ metadata.gz: c4069ae4029ec3f11274260b73d65fb7d45991d7fb037c36d1b111ed8a32ab3b
4
+ data.tar.gz: 71a36a5224bd3b057936519fc459ee9958939bf66b1b779d86b12a26c51b5e28
5
5
  SHA512:
6
- metadata.gz: 77e2682e1e0fc974381a3902c913f1d2c026131ebf8cf8dcccbb2bcb6d5579cda3baa5eb39314fa227270e2c700529dfcc0b011cff5fbf1e2a4e989fff3f2c0d
7
- data.tar.gz: 144a1e7fdf367b688aa387707841467de75f7ee71850bf96f0167219e61b3727c693581689c10421fc58ae0dfc5044454d23c6bb71435752a23bb30c146da1fc
6
+ metadata.gz: 6f64334d97044c3fc3d5851c73453d1819b78ab447ae6d7a4e9f995ca64a518bd2b781d0611278fc0a0315f51729ae76ab975a93e3b204d17586c964d39ad85e
7
+ data.tar.gz: 40523364197a2e26399011dd6720e972c4cc586ba63fe96fa21eee42ebd0ca6adc7c0b794245e957fc3d8256310179258e4bde3435f186cae200db94eb0652e7
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- testa_logger (0.1.17)
4
+ testa_logger (0.1.20)
5
5
  activesupport
6
6
  awesome_print
7
7
  aws-sdk-s3
@@ -21,8 +21,8 @@ GEM
21
21
  ast (2.4.2)
22
22
  awesome_print (1.9.2)
23
23
  aws-eventstream (1.2.0)
24
- aws-partitions (1.614.0)
25
- aws-sdk-core (3.131.5)
24
+ aws-partitions (1.619.0)
25
+ aws-sdk-core (3.132.0)
26
26
  aws-eventstream (~> 1, >= 1.0.2)
27
27
  aws-partitions (~> 1, >= 1.525.0)
28
28
  aws-sigv4 (~> 1.1)
@@ -80,27 +80,27 @@ module TestaLogger
80
80
  options.formatter
81
81
  end
82
82
 
83
- def debug(tag = "", *args, &block)
83
+ def debug(tag = nil, *args, &block)
84
84
  add_log_to_queue(DEBUG, tag, args, &block)
85
85
  end
86
86
 
87
- def info(tag = "", *args, &block)
87
+ def info(tag = nil, *args, &block)
88
88
  add_log_to_queue(INFO, tag, args, &block)
89
89
  end
90
90
 
91
- def warn(tag = "", *args, &block)
91
+ def warn(tag = nil, *args, &block)
92
92
  add_log_to_queue(WARN, tag, args, &block)
93
93
  end
94
94
 
95
- def error(tag = "", *args, &block)
95
+ def error(tag = nil, *args, &block)
96
96
  add_log_to_queue(ERROR, tag, args, &block)
97
97
  end
98
98
 
99
- def fatal(tag = "", *args, &block)
99
+ def fatal(tag = nil, *args, &block)
100
100
  add_log_to_queue(FATAL, tag, args, &block)
101
101
  end
102
102
 
103
- def unknown(tag = "", *args, &block)
103
+ def unknown(tag = nil, *args, &block)
104
104
  add_log_to_queue(UNKNOWN, tag, args, &block)
105
105
  end
106
106
 
@@ -187,7 +187,7 @@ module TestaLogger
187
187
  time = Time.now
188
188
  tag = extract_tag(tag, args)
189
189
  message = merge_message_args(args, &block)
190
- tag_and_message = merge_tag_and_message(tag, args, &block)
190
+ tag_and_message = merge_tag_and_message(tag, message)
191
191
  formatted_severity = format_severity(level)
192
192
  log = format_message(formatted_severity, time, "", tag_and_message)
193
193
 
@@ -198,9 +198,9 @@ module TestaLogger
198
198
  return unless options.stdout
199
199
 
200
200
  if level >= ERROR
201
- warn log
201
+ $stderr.puts(log) # rubocop:disable Style/StderrPuts
202
202
  else
203
- puts log
203
+ $stdout.puts(log)
204
204
  end
205
205
  end
206
206
 
@@ -210,7 +210,7 @@ module TestaLogger
210
210
  def extract_tag(tag, args)
211
211
  if args.count.zero?
212
212
  # if no additional arguments is given, message is in tag variable
213
- args.unshift(tag)
213
+ args.unshift(tag) unless tag.nil?
214
214
  tag = NO_TAG
215
215
  end
216
216
  tag
@@ -1,3 +1,3 @@
1
1
  module TestaLogger
2
- VERSION = "0.1.17"
2
+ VERSION = "0.1.20"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: testa_logger
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.17
4
+ version: 0.1.20
5
5
  platform: ruby
6
6
  authors:
7
7
  - karlo.razumovic
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-08-18 00:00:00.000000000 Z
11
+ date: 2022-08-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport