Module: EventMachine::AWS::Logger

Included in:
EventMachine::AWS
Defined in:
lib/em-aws/logger.rb

Instance Attribute Summary (collapse)

Instance Attribute Details

- (Object) logfile

The filename or IO object used for logging. Defaults to STDERR. Changing it will create a new logger.



37
38
39
# File 'lib/em-aws/logger.rb', line 37

def logfile
  @logfile ||= STDERR
end

- (Object) logger

An instance of the standard Ruby Logger or some compatible object. Defaults to logging warnings & above to STDERR. You can supply your own object, but if you do, the 'logfile' and 'loglevel' attributes will no longer apply.



17
18
19
20
21
22
23
24
# File 'lib/em-aws/logger.rb', line 17

def logger
  @logger ||= begin
    l = ::Logger.new logfile
    l.level = loglevel
    l.progname = "EM::AWS"
    l
  end
end

- (Object) loglevel

Minimum severity level for logging. Defaults to WARN.



43
44
45
# File 'lib/em-aws/logger.rb', line 43

def loglevel
  @loglevel ||= ::Logger::WARN
end