On Mar 25, 2011, at 7:28 AM, Jon F. wrote:
logging version 1.5.0
Why might one prefer it over log4r?
Logging was created when log4r was abandoned. I tried contacting the
original log4r developer many years ago and never received a response;
therefore I started the logging project. As a side note, this led to an
interesting discussion on how to handle abandoned projects on rubyforge.
There is a “benchmark.rb” file in the test directory that compares the
performance of logging, log4r, and the core ruby logger. It is a very
simple benchmark, but logging outperforms the others in all the tests
except for one (in that case the core ruby logger wins but just barely).
Any interesting optimizations similar to parameterized messages of
All those tricks apply. With the logging gem you can specify how general
ruby objects are formatted: string, inspect, or yaml. When you log a
general object then …
ary = [1, 2, 3, ‘four’, ‘five’, ‘six’]
The array will be printed out in the form
[1, 2, 3, “four”, “five”, “six”]
- colorization of log messages
Does this work on Windows? May need to use
Colorization inserts ANSI terminal codes into the log messages. I have
not tested it on windows with ansicon. However, if ansicon is truly
compliant then it should work just fine.
Good questions! I hope the answers were equally good.