WordPress at Your Fingertips
function is not described

WC_Log_Handler_File::format_entry() protected WC 1.0

Builds a log entry text from timestamp, level and message.

{} It's a method of the class: WC_Log_Handler_File{}

Hooks from the method

Return

String. Formatted log entry.

Usage

$result = WC_Log_Handler_File::format_entry( $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.

Code of WC_Log_Handler_File::format_entry() WC 5.8.0

protected static function format_entry( $timestamp, $level, $message, $context ) {

	if ( isset( $context['_legacy'] ) && true === $context['_legacy'] ) {
		if ( isset( $context['source'] ) && $context['source'] ) {
			$handle = $context['source'];
		} else {
			$handle = 'log';
		}
		$message = apply_filters( 'woocommerce_logger_add_message', $message, $handle );
		$time    = date_i18n( 'm-d-Y @ H:i:s' );
		$entry   = "{$time} - {$message}";
	} else {
		$entry = parent::format_entry( $timestamp, $level, $message, $context );
	}

	return $entry;
}