@@ -169,13 +169,13 @@ discard block |
||
169 | 169 | $this->log(self::DEBUG, $message); |
170 | 170 | } |
171 | 171 | |
172 | - /** |
|
173 | - * Logs with an arbitrary level. |
|
174 | - * |
|
175 | - * @param integer|string $level the log level in integer or string format, |
|
176 | - * if is string will convert into integer. |
|
177 | - * @param string $message the log message to be saved |
|
178 | - */ |
|
172 | + /** |
|
173 | + * Logs with an arbitrary level. |
|
174 | + * |
|
175 | + * @param integer|string $level the log level in integer or string format, |
|
176 | + * if is string will convert into integer. |
|
177 | + * @param string $message the log message to be saved |
|
178 | + */ |
|
179 | 179 | public function log($level, $message) { |
180 | 180 | $configLogLevel = get_config('log_level'); |
181 | 181 | if (!$configLogLevel) { |
@@ -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'; |