chrisboulton / php-resque

PHP port of resque (Workers and Queueing)
MIT License
3.43k stars 759 forks source link

What does the 'Psr\Log\LogLevel::INFO' mean ? #259

Closed jinleileiking closed 8 years ago

jinleileiking commented 9 years ago

In the code

    $logger->log(Psr\Log\LogLevel::INFO, 'Prefix set to {prefix}', array('prefix' => $PREFIX));

What does the 'Psr\Log\LogLevel::INFO' mean ?

The composer will change the \Log\ when compile ?

thanks.

danhunsaker commented 9 years ago

That's a reference to a constant defined in the PSR-3 spec, and the LogLevel class in the Psr\Log namespace. Any PSR-3 compliant logger implementation will accept that constant as its first argument, which is the log level (in this case, the INFO level).

jinleileiking commented 8 years ago

thans, a stupid question.