Add woocommerce_format_log_entry filter to base WC_Log_Handler class
This commit is contained in:
parent
2283956db6
commit
a0670cfae8
|
@ -129,6 +129,13 @@ abstract class WC_Log_Handler {
|
|||
public function format_entry( $timestamp, $level, $message, $context ) {
|
||||
$time_string = $this->format_time( $timestamp );
|
||||
$level_string = strtoupper( $level );
|
||||
return "{$time_string} {$level_string} {$message}";
|
||||
$entry = "{$time_string} {$level_string} {$message}";
|
||||
|
||||
return apply_filters( 'woocommerce_format_log_entry', $entry, array(
|
||||
'timestamp' => $timestamp,
|
||||
'level' => $level,
|
||||
'message' => $message,
|
||||
'context' => $context,
|
||||
) );
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue