If you need to find out if the currently configured logging level would allow a loggers logging statement to go through, use the loggers is_level() methods:
$logger->is_debug() # True if debug messages would go through
$logger->is_info() # True if info messages would go through
$logger->is_warn() # True if warn messages would go through
$logger->is_error() # True if error messages would go through
$logger->is_fatal() # True if fatal messages would go through
Example: $logger->is_warn() returns true if the loggers current level, as derived from either the loggers category (or, in absence of that, one of the loggers parents level setting) is $WARN, $ERROR or $FATAL.
上述两个地方说的是不是有冲突,请兄弟们给个意见。
有什么冲突啊!
就是warn以上级别的话,返回都是true了
呵呵。 jFresH_MaN(Contributing to Eclipse) 说的对.logger这些,其实就是如果设定了一个级别,那么低级别的不能执行某些动作,这个级别或者高级别的肯定可以执行某些动作。实际上,这个是为了调试的时候保证重要信息不被一般信息淹没