Commit b99db325 authored by Reto Da Forno's avatar Reto Da Forno
Browse files

print marker if log queue has been cleared

parent b38c672c
......@@ -103,6 +103,9 @@ uint32_t log_buffer_space(void)
static void log_buffer_clear(void)
{
if (!log_buffer_empty()) {
LOG_PRINT_FUNC(LOG_QUEUE_FULL_MARK LOG_NEWLINE, strlen(LOG_QUEUE_FULL_MARK LOG_NEWLINE)); /* to indicate data was dropped */
}
read_idx = write_idx = 0;
}
......
/*
* Copyright (c) 2018 - 2021, ETH Zurich, Computer Engineering Group (TEC)
* Copyright (c) 2018 - 2022, ETH Zurich, Computer Engineering Group (TEC)
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
......@@ -73,8 +73,8 @@
#define LOG_BUFFER_SIZE 4096
#endif /* LOG_BUFFER_SIZE */
#if LOG_BUFFER_SIZE >= 65536
#error "LOG_BUFFER_SIZE must be < 65536"
#if LOG_BUFFER_SIZE <= 0 || LOG_BUFFER_SIZE >= 65536
#error "invalid value for LOG_BUFFER_SIZE"
#endif /* LOG_BUFFER_SIZE */
/* max. number of chars per line, defines the buffer size used for sprintf() */
......@@ -100,7 +100,7 @@
#endif /* LOG_NEWLINE */
#ifndef LOG_QUEUE_FULL_MARK
#define LOG_QUEUE_FULL_MARK "\\~"
#define LOG_QUEUE_FULL_MARK "\\~" /* "queue full" or "data missing" marker */
#endif /* LOG_QUEUE_FULL_MARK */
#if LOG_ADD_LEVEL
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment