仅供参考,在 Windows 上,LOG_* “日志级别” 的值如下所示
<?php
namespace Test;
include 'vendor/autoload.php';
use Psr\Log\LogLevel;
$log_levels = array(
LogLevel::EMERGENCY => LOG_EMERG,
LogLevel::ALERT => LOG_ALERT,
LogLevel::CRITICAL => LOG_CRIT,
LogLevel::ERROR => LOG_ERR,
LogLevel::WARNING => LOG_WARNING,
LogLevel::NOTICE => LOG_NOTICE,
LogLevel::INFO => LOG_INFO,
LogLevel::DEBUG => LOG_DEBUG,
);
print_r($log_levels);
/*
prints:
Array
(
[emergency] => 1
[alert] => 1
[critical] => 1
[error] => 4
[warning] => 5
[notice] => 6
[info] => 6
[debug] => 6
)
*/