syslogger 1.5.0 → 1.5.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/syslogger.rb +5 -4
- metadata +3 -4
data/lib/syslogger.rb
CHANGED
@@ -4,9 +4,9 @@ require 'thread'
|
|
4
4
|
|
5
5
|
class Syslogger
|
6
6
|
|
7
|
-
VERSION = "1.5.
|
7
|
+
VERSION = "1.5.1"
|
8
8
|
|
9
|
-
attr_reader :level, :ident, :options, :facility, :max_octets
|
9
|
+
attr_reader :level, :ident, :options, :facility, :max_octets, :formatter
|
10
10
|
|
11
11
|
MAPPING = {
|
12
12
|
Logger::DEBUG => Syslog::LOG_DEBUG,
|
@@ -46,6 +46,7 @@ class Syslogger
|
|
46
46
|
@facility = facility
|
47
47
|
@level = Logger::INFO
|
48
48
|
@mutex = Mutex.new
|
49
|
+
@formatter = Logger::Formatter.new
|
49
50
|
end
|
50
51
|
|
51
52
|
%w{debug info warn error fatal unknown}.each do |logger_method|
|
@@ -81,8 +82,8 @@ class Syslogger
|
|
81
82
|
# If both are nil or no block is given, it will use the progname as per the behaviour of both the standard Ruby logger, and the Rails BufferedLogger.
|
82
83
|
# +progname+:: optionally, overwrite the program name that appears in the log message.
|
83
84
|
def add(severity, message = nil, progname = nil, &block)
|
84
|
-
if message.nil? && block.nil? && !progname.nil?
|
85
|
-
message, progname = progname, nil
|
85
|
+
if message.nil? && block.nil? && !progname.nil?
|
86
|
+
message, progname = progname, nil
|
86
87
|
end
|
87
88
|
progname ||= @ident
|
88
89
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: syslogger
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.
|
4
|
+
version: 1.5.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-07-02 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
@@ -94,11 +94,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
94
94
|
version: '1.3'
|
95
95
|
requirements: []
|
96
96
|
rubyforge_project:
|
97
|
-
rubygems_version: 1.8.
|
97
|
+
rubygems_version: 1.8.23
|
98
98
|
signing_key:
|
99
99
|
specification_version: 3
|
100
100
|
summary: Dead simple Ruby Syslog logger
|
101
101
|
test_files:
|
102
102
|
- spec/spec_helper.rb
|
103
103
|
- spec/syslogger_spec.rb
|
104
|
-
has_rdoc:
|