loggerx 0.3.5 → 0.3.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/loggerx/loggerx.rb +2 -2
- data/lib/loggerx/loggerxcm.rb +8 -3
- data/lib/loggerx/version.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: 3940a998f7539a4e361b9e8500133ff929bc941bf3ecaab4338a78b7c455dfc8
|
4
|
+
data.tar.gz: 2ffd905adc8f8109448f78db6d17531ab68ecc81b838d3fbfe832960fd485573
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0fdef43d7f1372742df2a745c8ca4ecac85426af19493bf6546fd0b3d5bb55da05fab80a78cf57459a9bd6ac0ebdc0335b610434507ce9c372832a36ffcaa1e2
|
7
|
+
data.tar.gz: 3fad2a62b451b2943f923665766632b32449d90c0ebf2b97cc85ff3be61ca2056b011806579a1665a2bc658d0ae640183c56dbbbddda8fe1dc6df463504de577
|
data/lib/loggerx/loggerx.rb
CHANGED
@@ -94,8 +94,8 @@ module Loggerx
|
|
94
94
|
end
|
95
95
|
|
96
96
|
def register_log_level(log_level)
|
97
|
-
@log_file
|
98
|
-
@log_stdout
|
97
|
+
@log_file&.level = log_level
|
98
|
+
@log_stdout&.level = log_level
|
99
99
|
#
|
100
100
|
# Log4r互換インターフェイス
|
101
101
|
# DEBUG < INFO < WARN < ERROR < FATAL < UNKNOWN
|
data/lib/loggerx/loggerxcm.rb
CHANGED
@@ -42,7 +42,7 @@ module Loggerx
|
|
42
42
|
list[0, latest_index].map(&:unlink) if latest_index.positive?
|
43
43
|
end
|
44
44
|
|
45
|
-
def init(prefix, fname, log_dir, stdout_flag, level
|
45
|
+
def init(prefix, fname, log_dir, stdout_flag, level: :info)
|
46
46
|
return if @log_file
|
47
47
|
|
48
48
|
@error_count = 0
|
@@ -55,6 +55,11 @@ module Loggerx
|
|
55
55
|
unknown: Logger::UNKNOWN
|
56
56
|
}
|
57
57
|
@log_level = level_hs[level]
|
58
|
+
if @log_level.nil?
|
59
|
+
p "level=#{level} level.class=#{level.class}"
|
60
|
+
return unless @log_level
|
61
|
+
end
|
62
|
+
|
58
63
|
@log_dir_pn = Pathname.new(log_dir)
|
59
64
|
|
60
65
|
@limit_of_num_of_files ||= 5
|
@@ -116,8 +121,8 @@ module Loggerx
|
|
116
121
|
end
|
117
122
|
|
118
123
|
def register_log_level(log_level)
|
119
|
-
|
120
|
-
|
124
|
+
@log_file&.level = log_level
|
125
|
+
@log_stdout&.level = log_level
|
121
126
|
#
|
122
127
|
# Log4r互換インターフェイス
|
123
128
|
# DEBUG < INFO < WARN < ERROR < FATAL < UNKNOWN
|
data/lib/loggerx/version.rb
CHANGED