H
Harnish Botadra
Hey guys,
I am having trouble displaying log messages with timestamps. My simple
code looks like:
----------------
require 'logger'
logger = Logger.new("/tmp/tmp.log")
logger.level = Logger:EBUG
logger.datetime_format = "%Y-%m-%d %H:%M:%S"
logger.info "Testing!"
----------------
All I get in my /tmp/tmp.log is:
----------------
$ tail -f /tmp/tmp.log
# Logfile created on Mon Jul 13 19:42:20 -0700 2009 by /
Testing!
----------------
How, do I get to display something like:
I, [2008-03-18T17:09:29.216000 #2020] DEBUG -- : Testing
Any pointers would be greatly appreciated.
Thanks,
Harnish
I am having trouble displaying log messages with timestamps. My simple
code looks like:
----------------
require 'logger'
logger = Logger.new("/tmp/tmp.log")
logger.level = Logger:EBUG
logger.datetime_format = "%Y-%m-%d %H:%M:%S"
logger.info "Testing!"
----------------
All I get in my /tmp/tmp.log is:
----------------
$ tail -f /tmp/tmp.log
# Logfile created on Mon Jul 13 19:42:20 -0700 2009 by /
Testing!
----------------
How, do I get to display something like:
I, [2008-03-18T17:09:29.216000 #2020] DEBUG -- : Testing
Any pointers would be greatly appreciated.
Thanks,
Harnish