Revert "DEV: Remove `git_version` from `DiscourseLogstashLogger` log event (#27730)" (#27814)

This reverts commit bb0daa33cd.

This commit was not causing the problems we thought it was.
This commit is contained in:
Alan Guo Xiang Tan 2024-07-10 10:36:22 +08:00 committed by GitHub
parent 54fba2005f
commit 0b64cb9d8c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 0 deletions

View File

@ -2,10 +2,12 @@
require "json"
require "socket"
require_relative "git_utils"
class DiscourseLogstashLogger < Logger
PROCESS_PID = Process.pid
HOST = Socket.gethostname
GIT_VERSION = GitUtils.git_version
attr_accessor :customize_event, :type
@ -65,6 +67,7 @@ class DiscourseLogstashLogger < Logger
"pid" => PROCESS_PID,
"type" => @type.to_s,
"host" => HOST,
"git_version" => GitUtils.git_version,
}
# Only log backtrace and env for Logger::WARN and above.

View File

@ -21,6 +21,7 @@ RSpec.describe DiscourseLogstashLogger do
"pid" => described_class::PROCESS_PID,
"type" => "test",
"host" => described_class::HOST,
"git_version" => described_class::GIT_VERSION,
"method" => "GET",
"path" => "/",
"format" => "html",