new_fmt_timestamp: Formatted Time stamp

View source: R/format.R

new_fmt_timestampR Documentation

Formatted Time stamp

Description

Placeholder for a formatted time stamp in a log layout.

Usage

new_fmt_timestamp(style, format = "[%x %H:%M:%S %z]")

Arguments

style

format style (crayon)

format

time stamp format, defaults to: %x %H:%M:%S %z, e.g., 12/04/21 14:31:25 -0500

Value

log metric layout.

See Also

Other Log Layout: evaluate_layout(), new_fmt_cls_field(), new_fmt_exec_scope(), new_fmt_layout(), new_fmt_line_break(), new_fmt_literal(), new_fmt_log_msg(), new_fmt_metric(), new_log_layout()

Examples

## Not run: 
fmt_timestamp(red $ bold, "%Y-%m-%d %H:%M:%S")

fmt_timestamp(blue $ italic, "%x %H:%M:%S %z")

## End(Not run)

dyn.log documentation built on March 18, 2022, 7:07 p.m.