logging: Add buffer flushing on entering panic
It may happen that panic occured while logger backend was formatting output data. In that case output buffer could get corrupted as logger assumes that processing happens in one context only (panic is the only exception). Added log output buffer flushing on entering panic state. Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
This commit is contained in:
parent
83bc07c826
commit
4e32721135
3 changed files with 3 additions and 1 deletions
|
@ -232,6 +232,7 @@ static void log_backend_rtt_init(void)
|
|||
|
||||
static void panic(struct log_backend const *const backend)
|
||||
{
|
||||
log_output_flush(&log_output);
|
||||
panic_mode = 1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue