]> git.mxchange.org Git - friendica.git/commitdiff
Add system.dlogip setting usage in dlogger()
authorHypolite Petovan <mrpetovan@gmail.com>
Sun, 4 Feb 2018 02:46:28 +0000 (21:46 -0500)
committerHypolite Petovan <mrpetovan@gmail.com>
Sun, 4 Feb 2018 02:46:28 +0000 (21:46 -0500)
include/text.php

index dc604124fd4bb8fbab371d7035447809ab026a03..285ab751e3a613ab109d145340d92dc75b3c9e9a 100644 (file)
@@ -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_") {