lib/lita/logger.rb in lita-4.3.2 vs lib/lita/logger.rb in lita-4.4.0
- old
+ new
@@ -4,15 +4,13 @@
class << self
# Creates a new {::Logger} outputting to standard error with the given
# severity level and a custom format.
# @param level [Symbol, String] The name of the log level to use.
# @return [::Logger] The {::Logger} object.
- def get_logger(level)
+ def get_logger(level, formatter = Lita.config.robot.log_formatter)
logger = ::Logger.new(STDERR)
logger.level = get_level_constant(level)
- logger.formatter = proc do |severity, datetime, _progname, msg|
- "[#{datetime.utc}] #{severity}: #{msg}\n"
- end
+ logger.formatter = formatter
logger
end
private