logging: Add option to suppress timestamp printing in log_output
Added flag in log_output module to add timestamp when message is formatted to a string. Updated existing backends. Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
This commit is contained in:
parent
07da32aae5
commit
2cc6d0c9c2
5 changed files with 20 additions and 8 deletions
|
@ -74,7 +74,9 @@ void shell_log_backend_disable(const struct shell_log_backend *backend)
|
|||
static void msg_process(const struct log_output *log_output,
|
||||
struct log_msg *msg)
|
||||
{
|
||||
u32_t flags = LOG_OUTPUT_FLAG_LEVEL | LOG_OUTPUT_FLAG_FORMAT_TIMESTAMP;
|
||||
u32_t flags = LOG_OUTPUT_FLAG_LEVEL |
|
||||
LOG_OUTPUT_FLAG_TIMESTAMP |
|
||||
LOG_OUTPUT_FLAG_FORMAT_TIMESTAMP;
|
||||
|
||||
if (IS_ENABLED(CONFIG_SHELL_VT100_COLORS)) {
|
||||
flags |= LOG_OUTPUT_FLAG_COLORS;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue