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
|
@ -22,13 +22,16 @@ extern "C" {
|
|||
/** @brief Flag forcing ANSI escape code colors, red (errors), yellow
|
||||
* (warnings).
|
||||
*/
|
||||
#define LOG_OUTPUT_FLAG_COLORS (1 << 0)
|
||||
#define LOG_OUTPUT_FLAG_COLORS BIT(0)
|
||||
|
||||
/** @brief Flag forcing timestamp */
|
||||
#define LOG_OUTPUT_FLAG_TIMESTAMP BIT(1)
|
||||
|
||||
/** @brief Flag forcing timestamp formatting. */
|
||||
#define LOG_OUTPUT_FLAG_FORMAT_TIMESTAMP (1 << 1)
|
||||
#define LOG_OUTPUT_FLAG_FORMAT_TIMESTAMP BIT(2)
|
||||
|
||||
/** @brief Flag forcing severity level prefix. */
|
||||
#define LOG_OUTPUT_FLAG_LEVEL (1 << 2)
|
||||
#define LOG_OUTPUT_FLAG_LEVEL BIT(3)
|
||||
|
||||
/**
|
||||
* @brief Prototype of the function processing output data.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue