def add_logger(stream, level)
      log = MonoLogger.new(stream)
      log.formatter = proc do |severity, datetime, progname, msg|
        "#{severity[0, 1]} #{datetime.strftime('%Y-%m-%d %H:%M:%S')} -- #{progname}: #{msg}\n"
      end
      log.level = MonoLogger.const_get(level)
      @loggers[stream] = log
    end
def add_logger(stream, level)
      log = MonoLogger.new(stream)
      log.formatter = proc do |severity, datetime, progname, msg|
        "#{severity[0, 1]} #{datetime.strftime('%Y-%m-%d %H:%M:%S')} -- #{progname}: #{msg}\n"
      end
      log.level = MonoLogger.const_get(level)
      @loggers[stream] = log
    end
Create the logger:

   # No log files will be written
   log = Hive::Log.new()
   # Write log files to standard out and a log file
   log = Hive::Log.new( [
                           {
                             stream: 'Filename.log',
                             level: 'DEBUG'
                           },
                           {
                             stream: STDOUT,
                             level: 'INFO'
                           },
                         ] )
 Add a new log location:

   # INFO level log to 'Filename.log'
   log.add_logger( 'Filename.log', 'INFO' )
   # DEBUG level log to standard output
   log.add_logger( STDOUT, 'DEBUG' )