@@ -169,7 +169,7 @@ discard block |
||
| 169 | 169 | $this->log(self::DEBUG, $message); |
| 170 | 170 | } |
| 171 | 171 | |
| 172 | - /** |
|
| 172 | + /** |
|
| 173 | 173 | * Logs with an arbitrary level. |
| 174 | 174 | * |
| 175 | 175 | * @param integer|string $level the log level in integer or string format, |
@@ -187,11 +187,11 @@ discard block |
||
| 187 | 187 | //NOTE: here need put the show_error() "logging" to false |
| 188 | 188 | //to prevent self function loop call |
| 189 | 189 | show_error('Invalid config log level [' . $configLogLevel . '], ' |
| 190 | - . 'the value must be one of the following: ' |
|
| 191 | - . implode(', ', array_map('strtoupper', self::$validConfigLevel)) |
|
| 192 | - , 'Log Config Error', |
|
| 193 | - $logging = false |
|
| 194 | - ); |
|
| 190 | + . 'the value must be one of the following: ' |
|
| 191 | + . implode(', ', array_map('strtoupper', self::$validConfigLevel)) |
|
| 192 | + , 'Log Config Error', |
|
| 193 | + $logging = false |
|
| 194 | + ); |
|
| 195 | 195 | return; |
| 196 | 196 | } |
| 197 | 197 | |
@@ -261,7 +261,7 @@ discard block |
||
| 261 | 261 | protected function levelCanSaveLog($level) { |
| 262 | 262 | $result = true; |
| 263 | 263 | $configLogLevel = get_config('log_level'); |
| 264 | - //check if can save log regarding the log level configuration |
|
| 264 | + //check if can save log regarding the log level configuration |
|
| 265 | 265 | $configLevel = self::getLevelValue($configLogLevel); |
| 266 | 266 | if ($configLevel > $level) { |
| 267 | 267 | //can't log |
@@ -341,7 +341,7 @@ discard block |
||
| 341 | 341 | //NOTE: here need put the show_error() "logging" to false |
| 342 | 342 | //to prevent self function loop call |
| 343 | 343 | show_error('Error : the log dir does not exist or is not writable', |
| 344 | - 'Log directory error', $logging = false); |
|
| 344 | + 'Log directory error', $logging = false); |
|
| 345 | 345 | } |
| 346 | 346 | |
| 347 | 347 | $path = $logSavePath . 'logs-' . date('Y-m-d') . '.log'; |
@@ -180,17 +180,17 @@ discard block |
||
| 180 | 180 | die(); |
| 181 | 181 | } |
| 182 | 182 | |
| 183 | - /** |
|
| 184 | - * Function defined for PHP error message handling |
|
| 185 | - * |
|
| 186 | - * @param int $errno the type of error for example: E_USER_ERROR, E_USER_WARNING, etc. |
|
| 187 | - * @param string $errstr the error message |
|
| 188 | - * @param string $errfile the file where the error occurred |
|
| 189 | - * @param int $errline the line number where the error occurred |
|
| 190 | - * @codeCoverageIgnore |
|
| 191 | - * |
|
| 192 | - * @return boolean |
|
| 193 | - */ |
|
| 183 | + /** |
|
| 184 | + * Function defined for PHP error message handling |
|
| 185 | + * |
|
| 186 | + * @param int $errno the type of error for example: E_USER_ERROR, E_USER_WARNING, etc. |
|
| 187 | + * @param string $errstr the error message |
|
| 188 | + * @param string $errfile the file where the error occurred |
|
| 189 | + * @param int $errline the line number where the error occurred |
|
| 190 | + * @codeCoverageIgnore |
|
| 191 | + * |
|
| 192 | + * @return boolean |
|
| 193 | + */ |
|
| 194 | 194 | function fw_error_handler($errno, $errstr, $errfile, $errline) { |
| 195 | 195 | $isError = (((E_ERROR | E_COMPILE_ERROR | E_CORE_ERROR | E_USER_ERROR) & $errno) === $errno); |
| 196 | 196 | if ($isError) { |
@@ -213,7 +213,7 @@ discard block |
||
| 213 | 213 | E_RECOVERABLE_ERROR => 'Catchable Fatal Error' |
| 214 | 214 | ); |
| 215 | 215 | if (isset($errorsType[$errno])) { |
| 216 | - $errorType = $errorsType[$errno]; |
|
| 216 | + $errorType = $errorsType[$errno]; |
|
| 217 | 217 | } |
| 218 | 218 | $errorText = 'An error is occurred in the file ' . $errfile . ' at line ' . $errline . ' raison : ' . $errstr; |
| 219 | 219 | if ((error_reporting() & $errno) !== $errno) { |