From 72e6bdaf135e11bf121b97bd575f32bc9f7b9ed7 Mon Sep 17 00:00:00 2001 From: Martin Mitterhauser Date: Thu, 21 Mar 2024 14:48:28 +0100 Subject: [PATCH] remove "add_file_and_line" config option --- Lib/Log/Engine/GraylogLog.php | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/Lib/Log/Engine/GraylogLog.php b/Lib/Log/Engine/GraylogLog.php index 85eb566..1d3a374 100644 --- a/Lib/Log/Engine/GraylogLog.php +++ b/Lib/Log/Engine/GraylogLog.php @@ -40,7 +40,6 @@ class GraylogLog extends BaseLog 'chunk_size' => UdpTransport::CHUNK_SIZE_LAN, 'ssl_options' => null, 'facility' => 'CakePHP', - 'add_file_and_line' => true, 'append_backtrace' => false, 'append_session' => false, 'append_post' => false, @@ -245,7 +244,6 @@ protected function createMessage($type, $message) } $gelfMessage->setAdditional('request_uri', $request->url); } - $add_file_and_line = $this->_config['add_file_and_line'] === true; /** * Append backtrace in case it's not already in the message. */ @@ -255,22 +253,13 @@ protected function createMessage($type, $message) * Create a debug backtrace. */ $trace = null; - if ($add_file_and_line || $append_backtrace) { + if ($append_backtrace) { $trace = new ClassicBacktrace( $this->_config['trace_level_offset'], $this->_config['file_root_dir'] ); } - /** - * In case the log didn't happen in memory (like with reflections), add - * the filename and line to the message. - */ - if ($add_file_and_line && (null !== $trace) && ($trace->lastStep('file') !== null)) { - $gelfMessage->setFile($trace->lastStep('file')); - $gelfMessage->setLine($trace->lastStep('line')); - } - /** * Append function output to the message. */