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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 29aa9e7ab752a0153a70eb61c1bc171f459a8bf617a8e38e7a949ea524aa2c56
4
- data.tar.gz: 3e6acd787505a13975d7d81b21309808dc340302cfeae2cf07590ca55ee4dfaf
3
+ metadata.gz: 3940a998f7539a4e361b9e8500133ff929bc941bf3ecaab4338a78b7c455dfc8
4
+ data.tar.gz: 2ffd905adc8f8109448f78db6d17531ab68ecc81b838d3fbfe832960fd485573
5
5
  SHA512:
6
- metadata.gz: 4efaeecbfd9d0e01617362ddf5dfd734b7cdc4f213ac923e3537b67b2f2b879c6e82e7beef9f0bace475ea8964c201c693906032a104f2ba2adf91c801e75724
7
- data.tar.gz: e930573db06a8d9a1524178322a57f173b4212c0f235a4a34dc9c84024853b788db22345a61e4ac3dea7b213e0e3b5dc149c203a8751d931fc335212d90d49e4
6
+ metadata.gz: 0fdef43d7f1372742df2a745c8ca4ecac85426af19493bf6546fd0b3d5bb55da05fab80a78cf57459a9bd6ac0ebdc0335b610434507ce9c372832a36ffcaa1e2
7
+ data.tar.gz: 3fad2a62b451b2943f923665766632b32449d90c0ebf2b97cc85ff3be61ca2056b011806579a1665a2bc658d0ae640183c56dbbbddda8fe1dc6df463504de577
@@ -94,8 +94,8 @@ module Loggerx
94
94
  end
95
95
 
96
96
  def register_log_level(log_level)
97
- @log_file.level = log_level
98
- @log_stdout.level = log_level
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
@@ -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 = :info)
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
- # @log_file&.level = log_level
120
- # @log_stdout&.level = log_level
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Loggerx
4
- VERSION = '0.3.5'
4
+ VERSION = '0.3.6'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: loggerx
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.5
4
+ version: 0.3.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - ykominami