syslog-ml-logger 1.8.0 → 1.8.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.
@@ -1,6 +1,7 @@
1
- = SyslogLogger
1
+ = SyslogMlLogger
2
2
 
3
- http://github.com/ngmoco/sysloglogger
3
+ http://github.com/Daniel304/syslog-ml-logger
4
+ http://rubygems.org/gems/syslog-ml-logger
4
5
 
5
6
  == DESCRIPTION:
6
7
 
@@ -17,8 +18,9 @@ will be ignored.
17
18
  This particular Logger::Syslog improves the original by correctly mapping Rails log severities to
18
19
  the Syslog counterparts. It also adds the ability to select a syslog facility other than "user."
19
20
 
20
- Version 1.8.0 cuts lines longer then 1024 characters in multiple lines cause syslog cuts them off
21
- Version 1.7.3 sends multiple lines to the syslog server instead of one large line which is cut of
21
+ Version 1.8.1 fixed missing last character thanks to fork of scambra and undefined method each-line when message isn't an array.
22
+ Version 1.8.0 cuts lines longer then 1024 characters in multiple lines cause syslog cuts them off.
23
+ Version 1.7.3 sends multiple lines to the syslog server instead of one large line which is cut of.
22
24
  Version 1.6.7 takes a formatter as logger does and uses call to format the message.
23
25
 
24
26
  == SYNOPSIS:
@@ -17,14 +17,6 @@ class Logger::SyslogFormatter < Logger::Formatter
17
17
 
18
18
  protected
19
19
 
20
- def format_datetime(time)
21
- if @datetime_format.nil?
22
- time.strftime("%H:%M:%S.") << "%06d " % time.usec
23
- else
24
- time.strftime(@datetime_format)
25
- end
26
- end
27
-
28
20
  def msg2str(msg)
29
21
  case msg
30
22
  when ::String
@@ -36,5 +28,4 @@ class Logger::SyslogFormatter < Logger::Formatter
36
28
  msg.inspect
37
29
  end
38
30
  end
39
-
40
31
  end
@@ -6,7 +6,7 @@ class Logger::Syslog
6
6
  include Logger::Severity
7
7
 
8
8
  # The version of Logger::Syslog you are using.
9
- VERSION = '1.8.0'
9
+ VERSION = '1.8.1'
10
10
 
11
11
  # Max length of syslog string
12
12
  MAXLENGTH = 1024
@@ -122,10 +122,14 @@ class Logger::Syslog
122
122
  end
123
123
 
124
124
  # breakup multiple lines into multiple syslog messages
125
- message.each_line do | msg |
126
- cut(line).each do |msg|
127
- SYSLOG.send(LEVEL_LOGGER_MAP[severity], format_message(format_severity(severity), Time.now, progname, clean(msg.chop)))
125
+ begin
126
+ message.each do | msg |
127
+ cut(line).each do |msg|
128
+ SYSLOG.send(LEVEL_LOGGER_MAP[severity], format_message(format_severity(severity), Time.now, progname, clean(msg)))
129
+ end
128
130
  end
131
+ rescue
132
+ SYSLOG.send(LEVEL_LOGGER_MAP[severity], format_message(format_severity(severity), Time.now, progname, clean(message)))
129
133
  end
130
134
  true
131
135
  end
@@ -1,6 +1,6 @@
1
1
  require 'test/unit'
2
2
  require 'tempfile'
3
- require 'syslog-logger'
3
+ require 'syslog-ml-logger'
4
4
 
5
5
  module MockSyslog; end
6
6
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: syslog-ml-logger
3
3
  version: !ruby/object:Gem::Version
4
- hash: 55
4
+ hash: 53
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 8
9
- - 0
10
- version: 1.8.0
9
+ - 1
10
+ version: 1.8.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Daniel van den Oord;Erwin Rohde,Eric Hodel; Chris Powell; Matthew Boeh; Ian Lesperance; Dana Danger; Brian Smith; Ashley Martens
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-11-30 00:00:00 Z
18
+ date: 2012-12-04 00:00:00 Z
19
19
  dependencies: []
20
20
 
21
21
  description: An improved Logger replacement that logs multiple-lines to syslog. It is almost drop-in with a few caveats.