Skip to content

A platform for community discussion. Free, open, simple.

Add Process pid to lograge output as well.

Guo Xiang Tane04d09d148c4
diff --git a/config/initializers/100-lograge.rb b/config/initializers/100-lograge.rb
index a92c9bc86f1..2f4ff2217e5 100644
--- a/config/initializers/100-lograge.rb
+++ b/config/initializers/100-lograge.rb
@@ -34,7 +34,8 @@ if (Rails.env.production? && SiteSetting.logging_provider == 'lograge') || ENV["
{
ip: ip,
username: username,
- hostname: `hostname`
+ hostname: `hostname`,
+ pid: Process.pid
}
rescue => e
Rails.logger.warn("Failed to append custom payload: #{e.message}\n#{e.backtrace.join("\n")}")