Improve logic for legacy `->add` message formatting
Suggestion via https://github.com/woocommerce/woocommerce/pull/12340#discussion_r88318220
This commit is contained in:
parent
ad03597a3d
commit
b645fa06b7
|
@ -93,8 +93,8 @@ class WC_Log_Handler_File extends WC_Log_Handler {
|
|||
$handle = 'log';
|
||||
}
|
||||
$message = apply_filters( 'woocommerce_logger_add_message', $message, $handle );
|
||||
$time = date_i18n( 'm-d-Y @ H:i:s -' );
|
||||
$entry = "{$time} {$message}";
|
||||
$time = date_i18n( 'm-d-Y @ H:i:s' );
|
||||
$entry = "{$time} - {$message}";
|
||||
} else {
|
||||
$entry = parent::format_entry( $level, $timestamp, $message, $context );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue