Hello, how can I increase LOG backend queue size? I was comparing some sdk_config settings with some examples, but did not find difference and the example does not fire this message. I am not logging much more info than the example.
Thank you.
Hello, how can I increase LOG backend queue size? I was comparing some sdk_config settings with some examples, but did not find difference and the example does not fire this message. I am not logging much more info than the example.
Thank you.
Hi,
How do you know you are loosing logs?
Do you use CLI with Logger or only Logger module?
I am using CLI with Logger and I can see this in the terminal:
And also I can not see some logs that I am expecting.
Hi Dusan,
I assume you are referring to nrf_cli example.
In the main.c you need to update define: CLI_EXAMPLE_LOG_QUEUE_SIZE used in the macro NRF_CLI_DEF. By default it has value == 4.
You can always run command: cli_stats to check queue usage.
I am initializing the NRF_CLI using this piece of code:
NRF_CLI_CMD_REGISTER(set, NULL, "help string test", cli_cmd_set); NRF_CLI_UART_DEF(m_cli_uart_transport, 0, 64, 16); NRF_CLI_DEF(m_cli_uart, "sequoia: ", &m_cli_uart_transport.transport, '\r', 4);
When I increase the "4" in the NRF_CLI_DEF to e.g. "5", the logs start to behave strangely, this is the output:
So even the error log is not complete...
If I increase the value to something greater, e.g. "12", I get this output:
-> I do not see the red error but I can see only first char of the "cli_prefix".
I am initializing the NRF_CLI using this piece of code:
NRF_CLI_CMD_REGISTER(set, NULL, "help string test", cli_cmd_set); NRF_CLI_UART_DEF(m_cli_uart_transport, 0, 64, 16); NRF_CLI_DEF(m_cli_uart, "sequoia: ", &m_cli_uart_transport.transport, '\r', 4);
When I increase the "4" in the NRF_CLI_DEF to e.g. "5", the logs start to behave strangely, this is the output:
So even the error log is not complete...
If I increase the value to something greater, e.g. "12", I get this output:
-> I do not see the red error but I can see only first char of the "cli_prefix".
Hi,
I have few additional questions:
1. Do you process nrf_cli in main like in the example?
2. May you try to increase buffers in NRF_CLI_UART_DEF: 64 ->1024 and 16->1024? Does it change anything?
3. Can you share your project? It will be hard to find the problem otherwise.
I have tested several combinations and have found out following: the problematic code is probably the NRF_LOG_HEXDUMP_INFO.
When using this NRF_LOG_HEXDUMP_INFO, I can not increase the queue size and I get the "lost logs" error. If I increase the queue size, the program fails somewhere (I can't see the leds blinking which indicates normal operation).
When I commented ou the NRF_LOG_HEXDUMP_INFO, I could increase the queue size without having the program crash and I do not have the "lost logs" error.
I did not need
Any idea why? Could this some bug in the NRF_LOG_HEXDUMP_INFO?
I have fixed it. Unfortunately don't know how and why. I just took the sdk_config.h file from the flash_fstorage example and compiled my project. Now everything seems to work fine.
I tried to compare my sdk_config with the one in the flash_fstorage but I failed. This is something what should be improved somehow - the documentation of sdk_config.
Hi,
May you please share with us the sdk_config.h file which was causing the problem?
Unfortunately I did not make a backup of the faulty sdk_config at the moment when I found the solution. But I have found something that is causing the same problem, see attached. Hope it helps.