diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-19 12:08:42 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-19 12:08:42 +0300 |
commit | b76ae638462ab0f673e5915986070518dd3f9ad3 (patch) | |
tree | bdab0533383b52873be0ec0eb4d3c66598ff8b91 /lib/gitlab/json_logger.rb | |
parent | 434373eabe7b4be9593d18a585fb763f1e5f1a6f (diff) |
Add latest changes from gitlab-org/gitlab@14-2-stable-eev14.2.0-rc42
Diffstat (limited to 'lib/gitlab/json_logger.rb')
-rw-r--r-- | lib/gitlab/json_logger.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/gitlab/json_logger.rb b/lib/gitlab/json_logger.rb index 3a74df8dc8f..d0dcd232ecc 100644 --- a/lib/gitlab/json_logger.rb +++ b/lib/gitlab/json_logger.rb @@ -7,7 +7,7 @@ module Gitlab end def format_message(severity, timestamp, progname, message) - data = {} + data = default_attributes data[:severity] = severity data[:time] = timestamp.utc.iso8601(3) data[Labkit::Correlation::CorrelationId::LOG_KEY] = Labkit::Correlation::CorrelationId.current_id @@ -21,5 +21,11 @@ module Gitlab Gitlab::Json.dump(data) + "\n" end + + protected + + def default_attributes + {} + end end end |