logging: log_output: Improve immediate mode handling
When in immediate mode ensure that buffering is not used in log output. Every byte is pushed to the transport. Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
This commit is contained in:
parent
50a54f4a4a
commit
117fab3004
4 changed files with 54 additions and 26 deletions
|
@ -9,6 +9,7 @@
|
|||
#include <logging/log_msg.h>
|
||||
#include <sys/util.h>
|
||||
#include <stdarg.h>
|
||||
#include <sys/atomic.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
@ -66,7 +67,7 @@ typedef int (*log_output_func_t)(u8_t *buf, size_t size, void *ctx);
|
|||
|
||||
/* @brief Control block structure for log_output instance. */
|
||||
struct log_output_control_block {
|
||||
size_t offset;
|
||||
atomic_t offset;
|
||||
void *ctx;
|
||||
const char *hostname;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue