debian-mirror-gitlab/lib/gitlab/log_timestamp_formatter.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

12 lines
319 B
Ruby
Raw Permalink Normal View History

2020-03-09 13:42:32 +05:30
# frozen_string_literal: true
module Gitlab
class LogTimestampFormatter < Logger::Formatter
FORMAT = "%s, [%s #%d] %5s -- %s: %s\n"
def call(severity, timestamp, program_name, message)
FORMAT % [severity[0..0], timestamp.utc.iso8601(3), $$, severity, program_name, msg2str(message)]
end
end
end