ashleym1972-syslog_logger 1.6.0 → 1.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/syslog_logger.rb +6 -5
- metadata +1 -1
data/lib/syslog_logger.rb
CHANGED
|
@@ -5,7 +5,7 @@ class SyslogLogger
|
|
|
5
5
|
include Logger::Severity
|
|
6
6
|
|
|
7
7
|
# The version of SyslogLogger you are using.
|
|
8
|
-
VERSION = '1.6.
|
|
8
|
+
VERSION = '1.6.1'
|
|
9
9
|
|
|
10
10
|
# From 'man syslog.h':
|
|
11
11
|
# LOG_EMERG A panic condition was reported to all processes.
|
|
@@ -80,10 +80,11 @@ class SyslogLogger
|
|
|
80
80
|
# Almost duplicates Logger#add. +progname+ is ignored.
|
|
81
81
|
def add(severity, message = nil, progname = nil, &block)
|
|
82
82
|
severity ||= Logger::UNKNOWN
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
83
|
+
if severity >= @level
|
|
84
|
+
message = clean(message || block.call)
|
|
85
|
+
SYSLOG.send LEVEL_LOGGER_MAP[severity], clean(message)
|
|
86
|
+
end
|
|
87
|
+
true
|
|
87
88
|
end
|
|
88
89
|
|
|
89
90
|
# Allows messages of a particular log level to be ignored temporarily.
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ashleym1972-syslog_logger
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.6.
|
|
4
|
+
version: 1.6.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Eric Hodel; Chris Powell; Matthew Boeh; Ian Lesperance; Dana Danger; Brian Smith; Ashley Martens
|