WC_Log_Handler_Email::add_log()
Add log message.
Method of the class: WC_Log_Handler_Email{}
No Hooks.
Return
null
. Nothing (null).
Usage
// protected - for code of main (parent) or child class $result = $this->add_log( $timestamp, $level, $message, $context );
- $timestamp(int) (required)
- Log timestamp.
- $level(string) (required)
- emergency|alert|critical|error|warning|notice|info|debug.
- $message(string) (required)
- Log message.
- $context(array) (required)
- Additional information for log handlers.
WC_Log_Handler_Email::add_log() WC Log Handler Email::add log code WC 9.3.1
protected function add_log( $timestamp, $level, $message, $context ) { $this->logs[] = $this->format_entry( $timestamp, $level, $message, $context ); $log_severity = WC_Log_Levels::get_level_severity( $level ); if ( $this->max_severity < $log_severity ) { $this->max_severity = $log_severity; } }