Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Proposed Logger rework to fix issue 728 #736
this evolved into a larger patch then intended, but hopefully satisfies all parties. I tried to refactor the Padrino Logger so that all the fancy stuff @DAddYE built is still working and - as an added bonus - can be added to other loggers as well. This works by splitting the logger implementation into 2 modules for proper extensions (like the #bench method for benchmarks and the #devel log level) and one for colorization (as some loggers, like syslog, cannot handle colors). Extensions are always added to any logger that is passed to #logger=, Colorization is only added on the users request. Example:
Also, I took the liberty of adding all those modules to a
This pull request also adds tests using Lumberjack and the ruby stdlib Logger as examples.
Merry Christmas, by the way.