From 6d0bebfda27e39dc1b2e4c7032d1f87b6fa38866 Mon Sep 17 00:00:00 2001 From: Daniel Neto Date: Fri, 28 Jun 2024 14:25:23 -0300 Subject: [PATCH] Update --- objects/functionsLogs.php | 10 +++++++--- plugin/CDN/Storage/CDNStorage.php | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/objects/functionsLogs.php b/objects/functionsLogs.php index 06059082deda..3913dcbdfce9 100644 --- a/objects/functionsLogs.php +++ b/objects/functionsLogs.php @@ -68,6 +68,7 @@ class AVideoLog public static $SECURITY = 3; public static $SOCKET = 4; public static $PERFORMANCE = 5; + public static $MONITORE = 6; } function _error_log_debug($message, $show_args = false) @@ -105,11 +106,11 @@ function _error_log($message, $type = 0, $doNotRepeat = false) $global['noDebug'] = array(); } if (!empty($global['noDebug']) && ($type == AVideoLog::$DEBUG || $type == AVideoLog::$PERFORMANCE)) { - if(is_array($global['noDebug'])){ - if(in_array($type, $global['noDebug'])){ + if (is_array($global['noDebug'])) { + if (in_array($type, $global['noDebug'])) { return false; } - }else if(($type == AVideoLog::$DEBUG || $type == AVideoLog::$PERFORMANCE)){ + } else if (($type == AVideoLog::$DEBUG || $type == AVideoLog::$PERFORMANCE)) { return false; } } @@ -133,6 +134,9 @@ function _error_log($message, $type = 0, $doNotRepeat = false) case AVideoLog::$PERFORMANCE: $prefix .= "PERFORMANCE: "; break; + case AVideoLog::$MONITORE: + $prefix .= "MONITORE: "; + break; } $str = $prefix . $message . " SCRIPT_NAME: {$_SERVER['SCRIPT_NAME']}"; /* diff --git a/plugin/CDN/Storage/CDNStorage.php b/plugin/CDN/Storage/CDNStorage.php index fb10038c75df..2bb06f740d5f 100644 --- a/plugin/CDN/Storage/CDNStorage.php +++ b/plugin/CDN/Storage/CDNStorage.php @@ -1227,7 +1227,7 @@ public static function addToLog($videos_id, $message) if (isCommandLineInterface()) { echo $message . PHP_EOL; } - _error_log($message); + _error_log($message, AVideoLog::$MONITORE); $file = self::getLogFile($videos_id); if (empty($file)) { return false;