Class Chef::Expander::Logger
In: lib/chef/expander/logger.rb
Parent: ::Logger

Customized Logger class that dispenses with the unnecessary mutexing. As long as you write one line at a time, the OS will take care of keeping your output in order. Expander commonly runs as a cluster of worker processes so the mutexing wasn‘t actually helping us anyway.

We don‘t use the program name field in the logger, so support for that has been removed. The log format is also hardcoded since we don‘t ever change the format.

Methods

<<   add   init   level=   log   new  

Constants

LEVELS = { :debug=>DEBUG, :info=>INFO, :warn=>WARN, :error=>ERROR, :fatal=>FATAL}
LEVEL_INTEGERS = LEVELS.invert
LEVEL_TO_STR = Hash[LEVEL_INTEGERS.map {|i,sym| [i,sym.to_s.upcase]}]
LOG_DEVICES = []

Attributes

log_device  [R] 

Public Class methods

Public Instance methods

(re-)initialize the Logger with a new IO object or file to log to.

log(severity=UNKNOWN, message = nil, progname = nil, &block)

Alias for add

[Validate]