WC_Logger::should_handle()
Determine whether to handle or ignore log.
Метод класса: WC_Logger{}
Хуков нет.
Возвращает
true|false
. True if the log should be handled.
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->should_handle( $level );
- $level(строка) (обязательный)
- emergency|alert|critical|error|warning|notice|info|debug.
Код WC_Logger::should_handle() WC Logger::should handle WC 9.5.1
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 ); }