mirror of
https://github.com/discourse/discourse.git
synced 2025-03-06 11:19:51 +00:00
This reverts commit bb0daa33cd93eeffb230689d1daacd737f61b2e7. This commit was not causing the problems we thought it was.
This commit is contained in:
parent
54fba2005f
commit
0b64cb9d8c
@ -2,10 +2,12 @@
|
|||||||
|
|
||||||
require "json"
|
require "json"
|
||||||
require "socket"
|
require "socket"
|
||||||
|
require_relative "git_utils"
|
||||||
|
|
||||||
class DiscourseLogstashLogger < Logger
|
class DiscourseLogstashLogger < Logger
|
||||||
PROCESS_PID = Process.pid
|
PROCESS_PID = Process.pid
|
||||||
HOST = Socket.gethostname
|
HOST = Socket.gethostname
|
||||||
|
GIT_VERSION = GitUtils.git_version
|
||||||
|
|
||||||
attr_accessor :customize_event, :type
|
attr_accessor :customize_event, :type
|
||||||
|
|
||||||
@ -65,6 +67,7 @@ class DiscourseLogstashLogger < Logger
|
|||||||
"pid" => PROCESS_PID,
|
"pid" => PROCESS_PID,
|
||||||
"type" => @type.to_s,
|
"type" => @type.to_s,
|
||||||
"host" => HOST,
|
"host" => HOST,
|
||||||
|
"git_version" => GitUtils.git_version,
|
||||||
}
|
}
|
||||||
|
|
||||||
# Only log backtrace and env for Logger::WARN and above.
|
# Only log backtrace and env for Logger::WARN and above.
|
||||||
|
@ -21,6 +21,7 @@ RSpec.describe DiscourseLogstashLogger do
|
|||||||
"pid" => described_class::PROCESS_PID,
|
"pid" => described_class::PROCESS_PID,
|
||||||
"type" => "test",
|
"type" => "test",
|
||||||
"host" => described_class::HOST,
|
"host" => described_class::HOST,
|
||||||
|
"git_version" => described_class::GIT_VERSION,
|
||||||
"method" => "GET",
|
"method" => "GET",
|
||||||
"path" => "/",
|
"path" => "/",
|
||||||
"format" => "html",
|
"format" => "html",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user