Stein Dekker Stein Dekker - 1 year ago 102
Ruby Question

How to format ruby logger?

How do you format the ruby logger?

Answer Source
logger ='nice.log')

logger.formatter = proc do |severity, datetime, progname, msg|
   "NICE: #{msg}\n"
end"I like cheese.")

# nice.log:
NICE: I like cheese.
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download