# File lib/logging/appenders/growl.rb, line 22 def initialize( name, opts = {} ) super @growl = "growlnotify -w -n \"#{@name}\" -t \"%s\" -m \"%s\" -p %d &" @coalesce = opts.getopt(:coalesce, false) @title_sep = opts.getopt(:separator) # provides a mapping from the default Logging levels # to the Growl notification levels @map = [-2, -1, 0, 1, 2] map = opts.getopt(:map) self.map = map unless map.nil? setup_coalescing if @coalesce # make sure the growlnotify command can be called unless system('growlnotify -v >> /dev/null 2>&1') self.level = :off ::Logging.log_internal {'growl notifications have been disabled'} end end