logger 1.4.2 → 1.4.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/logger.rb +5 -4
- data/lib/logger/formatter.rb +1 -1
- data/lib/logger/log_device.rb +1 -1
- data/lib/logger/version.rb +1 -1
- data/logger.gemspec +2 -2
- metadata +11 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: be49be41055335fa90e79c26a714b7176077de04b414def791b1a9524169ad80
|
4
|
+
data.tar.gz: f064246f7c9e483f96e9838ace1d079ce0d9acea770eb68d5a492a792157bb83
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8dc3387289106d3f98eda8384351d9486b8ad5bb21e5c58a3932595b101705600b1b66c64666eabab90a11f1d90a4b7f01e6f0ce658249bfb9ede51d76414ef4
|
7
|
+
data.tar.gz: 693e411b78fc95e47d008b3ced6247606ebb641f7a17368321e8e0002fa450694267794a620fc76f949ac9cf2a7e5ac8b891416d7d4accb738f8c2c228421388
|
data/lib/logger.rb
CHANGED
@@ -349,8 +349,9 @@ class Logger
|
|
349
349
|
# === Args
|
350
350
|
#
|
351
351
|
# +logdev+::
|
352
|
-
# The log device. This is a filename (String)
|
353
|
-
# +STDOUT+, +STDERR+, or an open file)
|
352
|
+
# The log device. This is a filename (String), IO object (typically
|
353
|
+
# +STDOUT+, +STDERR+, or an open file), +nil+ (it writes nothing) or
|
354
|
+
# +File::NULL+ (same as +nil+).
|
354
355
|
# +shift_age+::
|
355
356
|
# Number of old log files to keep, *or* frequency of rotation (+daily+,
|
356
357
|
# +weekly+ or +monthly+). Default value is 0, which disables log file
|
@@ -385,7 +386,7 @@ class Logger
|
|
385
386
|
self.datetime_format = datetime_format
|
386
387
|
self.formatter = formatter
|
387
388
|
@logdev = nil
|
388
|
-
if logdev
|
389
|
+
if logdev && logdev != File::NULL
|
389
390
|
@logdev = LogDevice.new(logdev, shift_age: shift_age,
|
390
391
|
shift_size: shift_size,
|
391
392
|
shift_period_suffix: shift_period_suffix,
|
@@ -410,7 +411,7 @@ class Logger
|
|
410
411
|
# Reopen a log device.
|
411
412
|
#
|
412
413
|
def reopen(logdev = nil)
|
413
|
-
@logdev
|
414
|
+
@logdev&.reopen(logdev)
|
414
415
|
self
|
415
416
|
end
|
416
417
|
|
data/lib/logger/formatter.rb
CHANGED
data/lib/logger/log_device.rb
CHANGED
data/lib/logger/version.rb
CHANGED
data/logger.gemspec
CHANGED
@@ -13,7 +13,7 @@ Gem::Specification.new do |spec|
|
|
13
13
|
spec.summary = %q{Provides a simple logging utility for outputting messages.}
|
14
14
|
spec.description = %q{Provides a simple logging utility for outputting messages.}
|
15
15
|
spec.homepage = "https://github.com/ruby/logger"
|
16
|
-
spec.
|
16
|
+
spec.licenses = ["Ruby", "BSD-2-Clause"]
|
17
17
|
|
18
18
|
spec.files = Dir.glob("lib/**/*.rb") + ["logger.gemspec"]
|
19
19
|
spec.bindir = "exe"
|
@@ -23,7 +23,7 @@ Gem::Specification.new do |spec|
|
|
23
23
|
spec.required_ruby_version = ">= 2.3.0"
|
24
24
|
|
25
25
|
spec.add_development_dependency "bundler", ">= 0"
|
26
|
-
spec.add_development_dependency "rake", "
|
26
|
+
spec.add_development_dependency "rake", ">= 12.3.3"
|
27
27
|
spec.add_development_dependency "test-unit"
|
28
28
|
spec.add_development_dependency "rdoc"
|
29
29
|
end
|
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logger
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Naotoshi Seo
|
8
8
|
- SHIBATA Hiroshi
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2020-12-22 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -29,16 +29,16 @@ dependencies:
|
|
29
29
|
name: rake
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
31
31
|
requirements:
|
32
|
-
- - "
|
32
|
+
- - ">="
|
33
33
|
- !ruby/object:Gem::Version
|
34
|
-
version:
|
34
|
+
version: 12.3.3
|
35
35
|
type: :development
|
36
36
|
prerelease: false
|
37
37
|
version_requirements: !ruby/object:Gem::Requirement
|
38
38
|
requirements:
|
39
|
-
- - "
|
39
|
+
- - ">="
|
40
40
|
- !ruby/object:Gem::Version
|
41
|
-
version:
|
41
|
+
version: 12.3.3
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
43
|
name: test-unit
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|
@@ -85,9 +85,10 @@ files:
|
|
85
85
|
- logger.gemspec
|
86
86
|
homepage: https://github.com/ruby/logger
|
87
87
|
licenses:
|
88
|
+
- Ruby
|
88
89
|
- BSD-2-Clause
|
89
90
|
metadata: {}
|
90
|
-
post_install_message:
|
91
|
+
post_install_message:
|
91
92
|
rdoc_options: []
|
92
93
|
require_paths:
|
93
94
|
- lib
|
@@ -102,8 +103,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
102
103
|
- !ruby/object:Gem::Version
|
103
104
|
version: '0'
|
104
105
|
requirements: []
|
105
|
-
rubygems_version: 3.
|
106
|
-
signing_key:
|
106
|
+
rubygems_version: 3.2.2
|
107
|
+
signing_key:
|
107
108
|
specification_version: 4
|
108
109
|
summary: Provides a simple logging utility for outputting messages.
|
109
110
|
test_files: []
|