From 3dda70baf138fc4699f3cdeb8ee625c721091c09 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sat, 3 Feb 2018 21:46:28 -0500 Subject: [PATCH] Add system.dlogip setting usage in dlogger() --- include/text.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/include/text.php b/include/text.php index dc604124f..285ab751e 100644 --- a/include/text.php +++ b/include/text.php @@ -737,12 +737,16 @@ function dlogger($msg, $level = 0) { return; } - $logfile = Config::get('system','dlogfile'); - + $logfile = Config::get('system', 'dlogfile'); if (! $logfile) { return; } + $dlogip = Config::get('system', 'dlogip'); + if ($dlogip && $_SERVER['REMOTE_ADDR'] != $dlogip) { + return; + } + if (count($LOGGER_LEVELS) == 0) { foreach (get_defined_constants() as $k => $v) { if (substr($k, 0, 7) == "LOGGER_") {