I Hate these long, frustrating long messages coming out on me when i look at the log. They are long, and needed a refreshing change for my opinion.
here is what i found:
There is a method which is responsible for the actual STDOUT printing for the log file, it's called Logger#format_message. I decided to overrun it in a more pretty way.
I created a /lib library called logger_format.rb and required it in environment.rb,
- class Logger
- def format_message(level, time, progname, msg)
- "#{time.to_s(:long)} -- #{msg}\n"
- end
- end
for example.try it out and feel free to modify the output structure at will.
0 comments:
Post a Comment