K
Karl
When creating a new logger, the datetime_format is not respected.
require 'logger'
log = Logger.new(STDOUT)
log.datetime_format = "%Y-%m-%d %H:%M:%S"
log.info "#{log.datetime_format}"
outputs:
I, [2010-03-03 14:31:31#66665] INFO -- : %Y-%m-%d %H:%M:%S
Tried in ruby 1.9.1 and 1.8.7 with same results. What am I missing?
require 'logger'
log = Logger.new(STDOUT)
log.datetime_format = "%Y-%m-%d %H:%M:%S"
log.info "#{log.datetime_format}"
outputs:
I, [2010-03-03 14:31:31#66665] INFO -- : %Y-%m-%d %H:%M:%S
Tried in ruby 1.9.1 and 1.8.7 with same results. What am I missing?