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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3f9c4fa6760b1c737b0f6ed81669bd55da57cadf1f8d10490cd87a1dd8a62276
4
- data.tar.gz: c36894cf227b89b9484c2783ec49c17b19603feaea4d8bffd769c5557f8b131d
3
+ metadata.gz: be49be41055335fa90e79c26a714b7176077de04b414def791b1a9524169ad80
4
+ data.tar.gz: f064246f7c9e483f96e9838ace1d079ce0d9acea770eb68d5a492a792157bb83
5
5
  SHA512:
6
- metadata.gz: 10f9370e05e660be96f6b073d03ca212bfc1ad4b672bb8e84a2c9fe0dd3d3d13fb86df80454d99dd52922bed0ee935bbd63844c14b377c8458814db70ab76b48
7
- data.tar.gz: 480f074ae1d5a4a4f0891d9fe1237b595e0edfdc396f85530deac0620f91ce27b774de828656a37531587a46cde6d347a6aac6639ce2b8f82418a1c58a955748
6
+ metadata.gz: 8dc3387289106d3f98eda8384351d9486b8ad5bb21e5c58a3932595b101705600b1b66c64666eabab90a11f1d90a4b7f01e6f0ce658249bfb9ede51d76414ef4
7
+ data.tar.gz: 693e411b78fc95e47d008b3ced6247606ebb641f7a17368321e8e0002fa450694267794a620fc76f949ac9cf2a7e5ac8b891416d7d4accb738f8c2c228421388
@@ -349,8 +349,9 @@ class Logger
349
349
  # === Args
350
350
  #
351
351
  # +logdev+::
352
- # The log device. This is a filename (String) or IO object (typically
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.reopen(logdev)
414
+ @logdev&.reopen(logdev)
414
415
  self
415
416
  end
416
417
 
@@ -12,7 +12,7 @@ class Logger
12
12
  end
13
13
 
14
14
  def call(severity, time, progname, msg)
15
- Format % [severity[0..0], format_datetime(time), $$, severity, progname,
15
+ Format % [severity[0..0], format_datetime(time), Process.pid, severity, progname,
16
16
  msg2str(msg)]
17
17
  end
18
18
 
@@ -135,7 +135,7 @@ class Logger
135
135
  end
136
136
  end
137
137
 
138
- if /mswin|mingw/ =~ RUBY_PLATFORM
138
+ if /mswin|mingw|cygwin/ =~ RUBY_PLATFORM
139
139
  def lock_shift_log
140
140
  yield
141
141
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class Logger
4
- VERSION = "1.4.2"
4
+ VERSION = "1.4.3"
5
5
  end
@@ -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.license = "BSD-2-Clause"
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", "~> 10.0"
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.2
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: 2019-12-10 00:00:00.000000000 Z
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: '10.0'
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: '10.0'
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.0.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: []