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 Normal View History

2020-03-13 15:44:24 +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