Add woocommerce_format_log_entry filter to base WC_Log_Handler class

This commit is contained in:
Jon Surrell 2016-11-20 21:38:26 +01:00
parent 2283956db6
commit a0670cfae8
1 changed files with 8 additions and 1 deletions

View File

@ -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,
) );
}
}