Class: GrowlLogger
- Inherits:
-
Logger
- Object
- Logger
- GrowlLogger
- Defined in:
- lib/growl-logger.rb
Defined Under Namespace
Classes: LogDevice
Constant Summary collapse
- VERSION =
'0.1.2'
Instance Method Summary collapse
-
#initialize(args = {}) ⇒ GrowlLogger
constructor
A new instance of GrowlLogger.
Constructor Details
#initialize(args = {}) ⇒ GrowlLogger
Returns a new instance of GrowlLogger.
8 9 10 11 12 13 14 15 16 |
# File 'lib/growl-logger.rb', line 8 def initialize(args = {}) super(GrowlLogger::LogDevice.new( args[:name] || 'growl-logger', args[:growlnotify] || false )) self.level = args[:level] if args[:level] self.datetime_format = args[:datetime_format] || '%X' self.formatter = lambda { |severity, time, progname, | "#{severity}: #{message}" } end |