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:
Krzysztof Chruscinski 2018-09-26 14:18:55 +02:00 committed by Carles Cufí
commit 2cc6d0c9c2
5 changed files with 20 additions and 8 deletions

View file

@ -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.