RTALogger 2.2.0 → 2.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/RTALogger/version.rb +1 -1
- data/lib/log_factory_log_formatter.rb +1 -1
- data/lib/log_formatter_base.rb +5 -1
- data/lib/log_repository.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 79dce21ae1cfe72961d564f9e750e49db0adcd564885293e971d482b1df6bf87
|
|
4
|
+
data.tar.gz: 44e1d3ae6c92779f6b69677a103c3614f4b2c03429a917c4f61c801b9ab43574
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 78bcdaa73b75e68da879c9f60fe9f3c0b0f9d914269572dc53fbaa3e02d5f1ecf56c35af42b33794675f3b4299f8a247f83aba846e1e9e2bbea18853a277b81d
|
|
7
|
+
data.tar.gz: 46b518ac6a9a2df21fd44cfffe3a4ca23e5c6aaba425d8bf5945efb9f590c5a92e945aac407488410f37a897ffb00f42dd0a0d90758eb15495bbab5811ff9bcc
|
data/Gemfile.lock
CHANGED
data/lib/RTALogger/version.rb
CHANGED
|
@@ -21,7 +21,7 @@ module RTALogger
|
|
|
21
21
|
return nil unless formatter_class
|
|
22
22
|
result = formatter_class.new
|
|
23
23
|
|
|
24
|
-
return result if config_json.empty?
|
|
24
|
+
return result if config_json.nil? || config_json.empty?
|
|
25
25
|
result.load_config(config_json) if result.present?
|
|
26
26
|
return result
|
|
27
27
|
end
|
data/lib/log_formatter_base.rb
CHANGED
|
@@ -15,6 +15,8 @@ module RTALogger
|
|
|
15
15
|
attr_accessor :colorize
|
|
16
16
|
|
|
17
17
|
def load_config(config_json)
|
|
18
|
+
return unless config_json.present?
|
|
19
|
+
|
|
18
20
|
@delimiter = config_json['delimiter'].nil? ? true : config_json['delimiter']
|
|
19
21
|
@colorize = config_json['colorize'].nil? ? false : config_json['colorize']
|
|
20
22
|
end
|
|
@@ -38,6 +40,8 @@ module RTALogger
|
|
|
38
40
|
end
|
|
39
41
|
|
|
40
42
|
def apply_run_time_config(config_json)
|
|
43
|
+
return unless config_json.present?
|
|
44
|
+
|
|
41
45
|
@delimiter = config_json['delimiter'] unless config_json['delimiter'].nil?
|
|
42
46
|
@colorize = config_json['colorize'] unless config_json['colorize'].nil?
|
|
43
47
|
end
|
|
@@ -65,7 +69,7 @@ module RTALogger
|
|
|
65
69
|
when 5
|
|
66
70
|
text.fatal_color
|
|
67
71
|
when 6
|
|
68
|
-
text.
|
|
72
|
+
text.unknown_color
|
|
69
73
|
else
|
|
70
74
|
text
|
|
71
75
|
end
|
data/lib/log_repository.rb
CHANGED
|
@@ -86,7 +86,7 @@ module RTALogger
|
|
|
86
86
|
def apply_run_time_config(config_json)
|
|
87
87
|
return unless config_json
|
|
88
88
|
@enable = config_json['enable'] unless config_json['enable'].nil?
|
|
89
|
-
@formatter.apply_run_time_config(config_json)
|
|
89
|
+
@formatter.apply_run_time_config(config_json['formatter'])
|
|
90
90
|
apply_run_time_config_filters(config_json)
|
|
91
91
|
end
|
|
92
92
|
|