Improve logic for legacy `->add` message formatting

Suggestion via https://github.com/woocommerce/woocommerce/pull/12340#discussion_r88318220
This commit is contained in:
Jon Surrell 2016-11-19 17:47:29 +01:00
parent ad03597a3d
commit b645fa06b7
1 changed files with 2 additions and 2 deletions

View File

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