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 +4 -4
- data/Gemfile.lock +3 -3
- data/lib/testa_logger/logger.rb +10 -10
- data/lib/testa_logger/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c4069ae4029ec3f11274260b73d65fb7d45991d7fb037c36d1b111ed8a32ab3b
|
4
|
+
data.tar.gz: 71a36a5224bd3b057936519fc459ee9958939bf66b1b779d86b12a26c51b5e28
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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.
|
25
|
-
aws-sdk-core (3.
|
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)
|
data/lib/testa_logger/logger.rb
CHANGED
@@ -80,27 +80,27 @@ module TestaLogger
|
|
80
80
|
options.formatter
|
81
81
|
end
|
82
82
|
|
83
|
-
def debug(tag =
|
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 =
|
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 =
|
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 =
|
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 =
|
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 =
|
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,
|
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
|
-
|
201
|
+
$stderr.puts(log) # rubocop:disable Style/StderrPuts
|
202
202
|
else
|
203
|
-
puts
|
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
|
data/lib/testa_logger/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2022-08-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|