Zephyr API Documentation 4.0.0
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
log_backend_std.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2019 Nordic Semiconductor ASA
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6#ifndef ZEPHYR_LOG_BACKEND_STD_H_
7#define ZEPHYR_LOG_BACKEND_STD_H_
8
11#include <zephyr/kernel.h>
12
13#ifdef __cplusplus
14extern "C" {
15#endif
16
25{
27
28 if (IS_ENABLED(CONFIG_LOG_BACKEND_SHOW_COLOR)) {
30 }
31
32 if (IS_ENABLED(CONFIG_LOG_BACKEND_FORMAT_TIMESTAMP)) {
34 }
35
36 if (IS_ENABLED(CONFIG_LOG_THREAD_ID_PREFIX)) {
38 }
39
40 return flags;
41}
42
47static inline void
48log_backend_std_panic(const struct log_output *const output)
49{
50 log_output_flush(output);
51}
52
58static inline void
59log_backend_std_dropped(const struct log_output *const output, uint32_t cnt)
60{
61 log_output_dropped_process(output, cnt);
62}
63
68#ifdef __cplusplus
69}
70#endif
71
72#endif /* ZEPHYR_LOG_BACKEND_STD_H_ */
#define LOG_OUTPUT_FLAG_THREAD
Flag thread id or name prefix.
Definition log_output.h:55
#define LOG_OUTPUT_FLAG_LEVEL
Flag forcing severity level prefix.
Definition log_output.h:42
#define LOG_OUTPUT_FLAG_FORMAT_TIMESTAMP
Flag forcing timestamp formatting.
Definition log_output.h:39
#define LOG_OUTPUT_FLAG_TIMESTAMP
Flag forcing timestamp.
Definition log_output.h:36
#define LOG_OUTPUT_FLAG_COLORS
Flag forcing ANSI escape code colors, red (errors), yellow (warnings).
Definition log_output.h:33
static uint32_t log_backend_std_get_flags(void)
Definition log_backend_std.h:24
static void log_backend_std_dropped(const struct log_output *const output, uint32_t cnt)
Report dropped messages to a standard logger backend.
Definition log_backend_std.h:59
static void log_backend_std_panic(const struct log_output *const output)
Put a standard logger backend into panic mode.
Definition log_backend_std.h:48
void log_output_dropped_process(const struct log_output *output, uint32_t cnt)
Process dropped messages indication.
static void log_output_flush(const struct log_output *output)
Flush output buffer.
Definition log_output.h:215
#define IS_ENABLED(config_macro)
Check for macro definition in compiler-visible expressions.
Definition util_macro.h:140
Public kernel APIs.
flags
Definition parser.h:96
__UINT32_TYPE__ uint32_t
Definition stdint.h:90
Log_output instance structure.
Definition log_output.h:96