mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-06 11:43:50 +00:00
Fix. Create log file only if necessary.
This commit is contained in:
@@ -67,18 +67,18 @@ class Logging
|
|||||||
$log_file = $_SESSION['logging']['log']['logfile'];
|
$log_file = $_SESSION['logging']['log']['logfile'];
|
||||||
$log_level = $_SESSION['logging']['log']['loglevel'];
|
$log_level = $_SESSION['logging']['log']['loglevel'];
|
||||||
|
|
||||||
if ($log_file) {
|
if ($log_level !== $level) {
|
||||||
$this->lfile($log_file);
|
return;
|
||||||
$this->lopen();
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$this->lopen();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($log_level === $level) {
|
if ($log_file) {
|
||||||
$this->lwrite("[".strtoupper($level)."] ".$msg);
|
$this->lfile($log_file);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$this->lopen();
|
||||||
|
|
||||||
|
$this->lwrite("[".strtoupper($level)."] ".$msg);
|
||||||
|
|
||||||
//close handle
|
//close handle
|
||||||
$this->lclose();
|
$this->lclose();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user