Log: try to properly handle log message before initialization
This commit is contained in:
parent
e27c009be8
commit
6faff353d3
1 changed files with 6 additions and 0 deletions
|
@ -161,6 +161,12 @@ class Log {
|
|||
);
|
||||
$level = 'WARNING';
|
||||
}
|
||||
if (!self :: $level)
|
||||
self :: $level = (
|
||||
App::initialized()?
|
||||
App::get('log.level', 'WARNING', 'string'):
|
||||
'WARNING'
|
||||
);
|
||||
if (self :: $levels[$level] < self :: $levels[self :: $level]) return true;
|
||||
if(self :: $filepath && is_null(self :: $file_fd)) {
|
||||
self :: $file_fd = fopen(self :: $filepath, 'a');
|
||||
|
|
Loading…
Reference in a new issue