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

In our official Docker image, running git commands results in the
following error:

```
fatal: detected dubious ownership in repository at '/var/www/discourse'
To add an exception for this directory, call:

	git config --global --add safe.directory /var/www/discourse
```
This commit is contained in:
Alan Guo Xiang Tan 2024-07-05 15:22:03 +08:00 committed by GitHub
parent 72fd509fd4
commit bb0daa33cd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 0 additions and 4 deletions

View File

@ -2,12 +2,10 @@
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
@ -67,7 +65,6 @@ 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,7 +21,6 @@ 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",