Created
March 24, 2014 23:05
-
-
Save fijimunkii/9751237 to your computer and use it in GitHub Desktop.
ruby: custom logger
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class CustomFormater < Logger::Formatter | |
def call(severity, time, progname, msg) | |
# msg2str is the internal helper that handles different msgs correctly | |
"#{time} - #{msg2str(msg)}" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment