logger 1.5.2 → 1.5.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/formatter.rb +2 -3
- data/lib/logger/log_device.rb +4 -2
- data/lib/logger/version.rb +1 -1
- data/logger.gemspec +0 -1
- metadata +3 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 299d68259bad0228e1e6519f73ddbef94902a8e04f230ad8bbc38f1cb7c45dee
|
4
|
+
data.tar.gz: 9178b4b52d2e025fefb9dcadebd94ff6a95392d5d381b949f8d2cb454d456bab
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1ee506486c7af0e574c4c4c58b28ca10c2d0d4a0493d0b405e43af96e93bb0c397dee7b128d0d89e7793724b6f0cb186c8e2d33aa2ff8cfc6e847e830e6c0127
|
7
|
+
data.tar.gz: 70c4a17f55e4eb5d2323ef5218151de9638a70b8690f6a40180b051554a17bd58b4a09521bbc8ca6a55b60afc9215d51b1c37873c0883e5ba3f42d89e4965a36
|
data/lib/logger/formatter.rb
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
class Logger
|
4
4
|
# Default formatter for log messages.
|
5
5
|
class Formatter
|
6
|
-
Format = "
|
6
|
+
Format = "%.1s, [%s #%d] %5s -- %s: %s\n"
|
7
7
|
DatetimeFormat = "%Y-%m-%dT%H:%M:%S.%6N"
|
8
8
|
|
9
9
|
attr_accessor :datetime_format
|
@@ -13,8 +13,7 @@ class Logger
|
|
13
13
|
end
|
14
14
|
|
15
15
|
def call(severity, time, progname, msg)
|
16
|
-
Format
|
17
|
-
msg2str(msg)]
|
16
|
+
sprintf(Format, severity, format_datetime(time), Process.pid, severity, progname, msg2str(msg))
|
18
17
|
end
|
19
18
|
|
20
19
|
private
|
data/lib/logger/log_device.rb
CHANGED
@@ -79,8 +79,10 @@ class Logger
|
|
79
79
|
def set_dev(log)
|
80
80
|
if log.respond_to?(:write) and log.respond_to?(:close)
|
81
81
|
@dev = log
|
82
|
-
if log.respond_to?(:path)
|
83
|
-
|
82
|
+
if log.respond_to?(:path) and path = log.path
|
83
|
+
if File.exist?(path)
|
84
|
+
@filename = path
|
85
|
+
end
|
84
86
|
end
|
85
87
|
else
|
86
88
|
@dev = open_logfile(log)
|
data/lib/logger/version.rb
CHANGED
data/logger.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logger
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.
|
4
|
+
version: 1.5.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Naotoshi Seo
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2022-12-
|
12
|
+
date: 2022-12-16 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -53,20 +53,6 @@ dependencies:
|
|
53
53
|
- - ">="
|
54
54
|
- !ruby/object:Gem::Version
|
55
55
|
version: '0'
|
56
|
-
- !ruby/object:Gem::Dependency
|
57
|
-
name: rdoc
|
58
|
-
requirement: !ruby/object:Gem::Requirement
|
59
|
-
requirements:
|
60
|
-
- - ">="
|
61
|
-
- !ruby/object:Gem::Version
|
62
|
-
version: '0'
|
63
|
-
type: :development
|
64
|
-
prerelease: false
|
65
|
-
version_requirements: !ruby/object:Gem::Requirement
|
66
|
-
requirements:
|
67
|
-
- - ">="
|
68
|
-
- !ruby/object:Gem::Version
|
69
|
-
version: '0'
|
70
56
|
description: Provides a simple logging utility for outputting messages.
|
71
57
|
email:
|
72
58
|
- sonots@gmail.com
|
@@ -103,7 +89,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
103
89
|
- !ruby/object:Gem::Version
|
104
90
|
version: '0'
|
105
91
|
requirements: []
|
106
|
-
rubygems_version: 3.
|
92
|
+
rubygems_version: 3.3.26
|
107
93
|
signing_key:
|
108
94
|
specification_version: 4
|
109
95
|
summary: Provides a simple logging utility for outputting messages.
|