You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
after update to 1.3.0, all channels except info are not shown.
You can actually run examples/logging.php to see that only debug message will be shown.
I would expect that when you select logging level to "debug" to see all messages ,while if I set to emergency, then to see only "emergency" errors. Currently it works in the opposite way: Emergency shows everything, debug show only debug messages.
Reason is in this method:
public function setLogLevel($level)
{
if (!isset($this->loglevel[$level])) $this->fatal('Unknown log level');
$enable = true;
foreach (array_keys($this->loglevel) as $l) {
$this->loglevel[$l]['enabled'] = $enable;
if ($l == $level) $enable = false;
}
}
Order of loglevels should be reversed, or $enabled should be false by default.
The text was updated successfully, but these errors were encountered:
olelis
added a commit
to olelis/php-cli
that referenced
this issue
Jan 16, 2024
Hello,
after update to 1.3.0, all channels except info are not shown.
You can actually run examples/logging.php to see that only debug message will be shown.
I would expect that when you select logging level to "debug" to see all messages ,while if I set to emergency, then to see only "emergency" errors. Currently it works in the opposite way: Emergency shows everything, debug show only debug messages.
Reason is in this method:
Order of loglevels should be reversed, or $enabled should be false by default.
The text was updated successfully, but these errors were encountered: