Class: Ramaze::Logger::Growl
- Inherits:
-
Growl
- Object
- Growl
- Ramaze::Logger::Growl
- Includes:
- Innate::Traited, Ramaze::Logging
- Defined in:
- lib/ramaze/log/growl.rb
Overview
Informer for the Growl notification system Growl lets Mac OS X applications unintrusively tell you when things happen.
Growl can be downloaded from the following website: growl.info/
Instance Method Summary (collapse)
-
- (Growl) initialize(options = {})
constructor
Takes the options from the default trait for merging.
-
- (Object) log(tag, *args)
Integration to Logging.
Methods included from Ramaze::Logging
#debug, #debug?, #dev, #error, #info, #shutdown, #tag_log, #warn
Constructor Details
- (Growl) initialize(options = {})
Takes the options from the default trait for merging.
32 33 34 35 36 37 38 |
# File 'lib/ramaze/log/growl.rb', line 32 def initialize( = {}) = class_trait[:defaults].merge().values_at( :host, :name, :all_notifies, :default_notifies, :password ) super(*) end |
Instance Method Details
- (Object) log(tag, *args)
Integration to Logging
46 47 48 49 50 51 52 |
# File 'lib/ramaze/log/growl.rb', line 46 def log(tag, *args) begin notify(tag.to_s, Time.now.strftime("%X"), args.join("\n")[0..100]) rescue Errno::EMSGSIZE # Send size was to big (not really), ignore end end |