PERF: Don't execute a git command each time we log a log line (#30177)

We already have a `GIT_VERSION` constant in `DiscourseLogstashLogger` so
we can just use that.
This commit is contained in:
Alan Guo Xiang Tan 2024-12-09 11:11:03 +08:00 committed by GitHub
parent 4ddf7e61f9
commit 25ce1f3399
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -67,7 +67,7 @@ class DiscourseLogstashLogger < Logger
"pid" => PROCESS_PID,
"type" => @type.to_s,
"host" => HOST,
"git_version" => GitUtils.git_version,
"git_version" => GIT_VERSION,
}
# Only log backtrace and env for Logger::WARN and above.