shell: Improve handling of log messages
If burst of log messages was passed to the shell log backend, it was likely that messages were lost because shell had no means to control arrivals of log messages. Added log message enqueueing timeout to the shell instance to allow blocking logger thread if short-term arrival rate exceeded shell capabilities. Added kconfig option for setting log message queue size and timeout in RTT and UART instances. Added section in shell documentation which explains interaction between the logger and shell instance acting as a logger backend. Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
This commit is contained in:
parent
801b54edb9
commit
08f0d93cbb
10 changed files with 87 additions and 20 deletions
10
subsys/shell/Kconfig.template.shell_log_queue_timeout
Normal file
10
subsys/shell/Kconfig.template.shell_log_queue_timeout
Normal file
|
@ -0,0 +1,10 @@
|
|||
config $(module)_LOG_MESSAGE_QUEUE_TIMEOUT
|
||||
int "Log message drop timeout (in milliseconds)"
|
||||
default $(default-timeout)
|
||||
range -1 10000
|
||||
help
|
||||
If queue with pending log messages is full, oldest log message is
|
||||
dropped if queue is still full after requested time (-1 is forever).
|
||||
Logger thread is blocked for that period, thus long timeout impacts
|
||||
other logger backends and must be used with care.
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue