From a9968fcb71d68d10518c5253ad7b1c1995765e1a Mon Sep 17 00:00:00 2001 From: "Jon R. Humphrey" Date: Fri, 25 Oct 2024 14:46:10 +0100 Subject: [PATCH] fix: resolve `PATH` as alias for `:request_path` as well as restores `path` to required keys list --- lib/json_rails_logger/constants.rb | 1 + lib/json_rails_logger/json_formatter.rb | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/json_rails_logger/constants.rb b/lib/json_rails_logger/constants.rb index 8c01206..5be4f54 100644 --- a/lib/json_rails_logger/constants.rb +++ b/lib/json_rails_logger/constants.rb @@ -6,6 +6,7 @@ module JsonRailsLogger EXCEPTION = :exception MESSAGE = :message METHOD = :method + PATH = :request_path # Alias for REQUEST_PATH QUERY_STRING = :query_string REQUEST_ID = :request_id REQUEST_PARAMS = :request_params diff --git a/lib/json_rails_logger/json_formatter.rb b/lib/json_rails_logger/json_formatter.rb index 7c7be3f..b988885 100644 --- a/lib/json_rails_logger/json_formatter.rb +++ b/lib/json_rails_logger/json_formatter.rb @@ -27,6 +27,7 @@ class JsonFormatter < ::Logger::Formatter # rubocop:disable Metrics/ClassLength keep_alive message method + path query_string remote_addr request_id