WC_Logger::should_handle
Determine whether to handle or ignore log.
Method of the class: WC_Logger{}
No Hooks.
Returns
true|false. True if the log should be handled.
Usage
// protected - for code of main (parent) or child class $result = $this->should_handle( $level );
- $level(string) (required)
- emergency|alert|critical|error|warning|notice|info|debug.
WC_Logger::should_handle() WC Logger::should handle code WC 10.4.3
protected function should_handle( $level ) {
if ( ! LoggingUtil::logging_is_enabled() ) {
return false;
}
$threshold = $this->get_threshold();
return $threshold <= WC_Log_Levels::get_level_severity( $level );
}