From: Hypolite Petovan Date: Sun, 4 Feb 2018 02:46:28 +0000 (-0500) Subject: Add system.dlogip setting usage in dlogger() X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=3dda70baf138fc4699f3cdeb8ee625c721091c09;p=friendica.git Add system.dlogip setting usage in dlogger() --- diff --git a/include/text.php b/include/text.php index dc604124fd..285ab751e3 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_") {