WC_Log_Handler_DB::handle()
Handle a log entry.
Метод класса: WC_Log_Handler_DB{}
Хуков нет.
Возвращает
true|false
. False if value was not handled and true if value was handled.
Использование
$WC_Log_Handler_DB = new WC_Log_Handler_DB(); $WC_Log_Handler_DB->handle( $timestamp, $level, $message, $context );
- $timestamp(int) (обязательный)
- Log timestamp.
- $level(строка) (обязательный)
- emergency|alert|critical|error|warning|notice|info|debug.
- $message(строка) (обязательный)
- Log message.
- $context(массив) (обязательный)
Additional information for log handlers.
- source(строка)
Optional. Source will be available in log table. If no source is provided, attempt to provide sensible default.
- source(строка)
Заметки
- Смотрите: WC_Log_Handler_DB::get_log_source() for default source.
Код WC_Log_Handler_DB::handle() WC Log Handler DB::handle WC 8.7.0
public function handle( $timestamp, $level, $message, $context ) { if ( isset( $context['source'] ) && $context['source'] ) { $source = $context['source']; } else { $source = $this->get_log_source(); } return $this->add( $timestamp, $level, $message, $source, $context ); }