Solve minor bug in logs for pretty format.
@@ -196,6 +196,14 @@ static size_t log_policy_format_text_serialize_impl(log_policy policy, const log
const char * format = log_policy_format_text_serialize_impl_format(log_impl_level(impl), text_data->flags);
+ #if (LOG_POLICY_FORMAT_PRETTY == 1)
+ {
+ length = snprintf(buffer, size, format,
+ log_level_to_string(log_record_level(record)),
+ log_record_message(record));
+ }
+ #else
+ {
if (log_impl_level(impl) == LOG_LEVEL_DEBUG)
{
length = snprintf(buffer, size, format,
@@ -215,6 +223,8 @@ static size_t log_policy_format_text_serialize_impl(log_policy policy, const log
log_level_to_string(log_record_level(record)),
log_record_message(record));
}
+ }
+ #endif
if (length <= 0)
{
