Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Neto committed Jun 28, 2024
1 parent 01fba97 commit 6d0bebf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
10 changes: 7 additions & 3 deletions objects/functionsLogs.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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;
}
}
Expand All @@ -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']}";
/*
Expand Down
2 changes: 1 addition & 1 deletion plugin/CDN/Storage/CDNStorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 6d0bebf

Please sign in to comment.