logging: Remove code duplication from log_backend_std

log_backend_std_put had its own implementation for getting standard
flags which was identical to the one in log_backend_std_get_flags().

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
This commit is contained in:
Krzysztof Chruscinski 2021-07-13 08:16:01 +02:00 committed by Christopher Friedt
commit 81046088af

View file

@ -48,15 +48,7 @@ log_backend_std_put(const struct log_output *const output, uint32_t flags,
{
log_msg_get(msg);
flags |= (LOG_OUTPUT_FLAG_LEVEL | LOG_OUTPUT_FLAG_TIMESTAMP);
if (IS_ENABLED(CONFIG_LOG_BACKEND_SHOW_COLOR)) {
flags |= LOG_OUTPUT_FLAG_COLORS;
}
if (IS_ENABLED(CONFIG_LOG_BACKEND_FORMAT_TIMESTAMP)) {
flags |= LOG_OUTPUT_FLAG_FORMAT_TIMESTAMP;
}
flags |= log_backend_std_get_flags();
log_output_msg_process(output, msg, flags);