Skip to content

Instantly share code, notes, and snippets.

@fijimunkii
Created March 24, 2014 23:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fijimunkii/9751237 to your computer and use it in GitHub Desktop.
Save fijimunkii/9751237 to your computer and use it in GitHub Desktop.
ruby: custom logger
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