Skip to content

Instantly share code, notes, and snippets.

@lotherk
Created March 11, 2014 19:44
Show Gist options
  • Save lotherk/9493544 to your computer and use it in GitHub Desktop.
Save lotherk/9493544 to your computer and use it in GitHub Desktop.
require 'logger'
logger = Logger.new(STDOUT)
logger.formatter = proc { |severity, datetime, progname, msg|
"#{datetime} #{severity} #{caller[4]}: #{msg}"
}
logger.info "This is a log message"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment