Skip to content

Instantly share code, notes, and snippets.

@labocho
Last active January 13, 2022 07:43
Show Gist options
  • Save labocho/8159aa5d3c6fb9cd383879a3b355e92d to your computer and use it in GitHub Desktop.
Save labocho/8159aa5d3c6fb9cd383879a3b355e92d to your computer and use it in GitHub Desktop.
require "logger"
$stdout.sync = true
logger = Logger.new($stdout)
logger.formatter = -> (severity, datetime, _progname, message) {
{
severity: severity,
time: datetime.to_i,
}.merge(message).to_json + "\n"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment