lib/syslogger.rb in syslogger-1.4.0 vs lib/syslogger.rb in syslogger-1.4.1
- old
+ new
@@ -2,11 +2,11 @@
require 'logger'
require 'thread'
class Syslogger
- VERSION = "1.4.0"
+ VERSION = "1.4.1"
attr_reader :level, :ident, :options, :facility
MAPPING = {
Logger::DEBUG => Syslog::LOG_DEBUG,
@@ -101,9 +101,14 @@
unless level.is_a?(Fixnum)
raise ArgumentError.new("Invalid logger level `#{level.inspect}`")
end
@level = level
+ end
+
+ # Sets the ident string passed along to Syslog
+ def ident=(ident)
+ @ident = ident
end
protected
# Borrowed from SyslogLogger.