Skip to content

Instantly share code, notes, and snippets.

@fijimunkii
Created March 24, 2014 23:05
Show Gist options
  • Select an option

  • Save fijimunkii/9751237 to your computer and use it in GitHub Desktop.

Select an option

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