logging: Add option to suppress level printing in log_output

Added flag in log_output module to add severity level 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 08:12:45 +02:00 committed by Carles Cufí
commit 07da32aae5
5 changed files with 21 additions and 14 deletions

View file

@ -22,10 +22,13 @@ 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 (1 << 0)
/** @brief Flag forcing timestamp formatting. */
#define LOG_OUTPUT_FLAG_FORMAT_TIMESTAMP (1 << 1)
#define LOG_OUTPUT_FLAG_FORMAT_TIMESTAMP (1 << 1)
/** @brief Flag forcing severity level prefix. */
#define LOG_OUTPUT_FLAG_LEVEL (1 << 2)
/**
* @brief Prototype of the function processing output data.