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>
Even though interrupts are locked before processing in synchronous
call, it is still possible that they will be interrupted by NMI.
In that case log_output module may assert because of buffer
overwritting.
Added flushing of log_output buffer before starting the process to
ensure that output buffer is always in reset state at the beginning.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Cleaning up log.h include dependencies to allow log.h including in base
headers (e.g. kernel.h).
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Simple backends, like UART or RTT, implementation is very similar.
Header has functions which can be reused by simple backends and
remove redundant code.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>