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.
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 | = | [] |
log_device | [R] |