<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Lost LOGs - increase LOG backend queue size.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/32512/lost-logs---increase-log-backend-queue-size</link><description>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.</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 08 Jul 2020 08:38:35 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/32512/lost-logs---increase-log-backend-queue-size" /><item><title>RE: Lost LOGs - increase LOG backend queue size.</title><link>https://devzone.nordicsemi.com/thread/258940?ContentTypeID=1</link><pubDate>Wed, 08 Jul 2020 08:38:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:db8395b2-d504-478c-b113-d87c0b9c72f2</guid><dc:creator>jacksong</dc:creator><description>&lt;p&gt;Thank you very much!&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This question has been wasted me for two hours until saw your answer&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Lost LOGs - increase LOG backend queue size.</title><link>https://devzone.nordicsemi.com/thread/254950?ContentTypeID=1</link><pubDate>Mon, 15 Jun 2020 09:54:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:68506d4c-3db3-45c4-85f2-f4a42f086eff</guid><dc:creator>Karol D</dc:creator><description>&lt;p&gt;Ok, I have found the reason, it is this line:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;#define NRF_LOG_DEFERRED 0&lt;/pre&gt;&lt;br /&gt;It has to be changed for:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;#define NRF_LOG_DEFERRED 1&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Another words - bigger log buffer than 4 bytes can not be sent at once. Thus, you have to enable deferred logger. In my opinion there should be suitable comment in cli example above the lines:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;/** @brief Command line interface instance. */
#define CLI_EXAMPLE_LOG_QUEUE_SIZE  (4)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Lost LOGs - increase LOG backend queue size.</title><link>https://devzone.nordicsemi.com/thread/254887?ContentTypeID=1</link><pubDate>Mon, 15 Jun 2020 07:34:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e74cca19-04e7-480b-a0bc-912b364dbb83</guid><dc:creator>Karol D</dc:creator><description>&lt;p&gt;Hello,&lt;br /&gt;I have the same problem. Is there any known solution which won&amp;#39;t affect whole sdk_config.h file?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Lost LOGs - increase LOG backend queue size.</title><link>https://devzone.nordicsemi.com/thread/125371?ContentTypeID=1</link><pubDate>Wed, 21 Mar 2018 14:07:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:76f96deb-c105-49c8-87a7-6dcd26ebe786</guid><dc:creator>Dusan Daniska</dc:creator><description>&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/sdk_5F00_config_5F00_dusan.h"&gt;devzone.nordicsemi.com/.../sdk_5F00_config_5F00_dusan.h&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Lost LOGs - increase LOG backend queue size.</title><link>https://devzone.nordicsemi.com/thread/125089?ContentTypeID=1</link><pubDate>Tue, 20 Mar 2018 07:03:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:799589ac-6693-49de-bbc1-f544216fd5f0</guid><dc:creator>Jakub Rzeszutko</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;May you please share with us the sdk_config.h file which was causing the problem?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Lost LOGs - increase LOG backend queue size.</title><link>https://devzone.nordicsemi.com/thread/125049?ContentTypeID=1</link><pubDate>Mon, 19 Mar 2018 16:25:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b48ef9db-98b9-4dd6-a74b-b3cf435390c3</guid><dc:creator>Dusan Daniska</dc:creator><description>&lt;p&gt;I have&amp;nbsp;fixed it. Unfortunately don&amp;#39;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.&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Lost LOGs - increase LOG backend queue size.</title><link>https://devzone.nordicsemi.com/thread/125029?ContentTypeID=1</link><pubDate>Mon, 19 Mar 2018 14:30:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2cda54ca-d3f8-4208-8e51-8bf4f97a47f0</guid><dc:creator>Dusan Daniska</dc:creator><description>&lt;p&gt;I have tested several combinations and have found out following: the problematic code is probably the&amp;nbsp;NRF_LOG_HEXDUMP_INFO.&lt;/p&gt;
&lt;p&gt;When using this&amp;nbsp;NRF_LOG_HEXDUMP_INFO, I can not increase the queue size and I get the &amp;quot;lost logs&amp;quot; error.&amp;nbsp;If I increase the queue size, the program fails somewhere (I can&amp;#39;t see the leds blinking which indicates normal operation).&lt;/p&gt;
&lt;p&gt;When I commented ou the&amp;nbsp;NRF_LOG_HEXDUMP_INFO, I could increase the queue size without having the program crash and I do not have the &amp;quot;lost logs&amp;quot; error.&lt;/p&gt;
&lt;p&gt;I did not need&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Any idea why? Could this some bug in the&amp;nbsp;NRF_LOG_HEXDUMP_INFO?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Lost LOGs - increase LOG backend queue size.</title><link>https://devzone.nordicsemi.com/thread/125020?ContentTypeID=1</link><pubDate>Mon, 19 Mar 2018 14:06:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ac5b2fed-2c9c-42d6-bba1-be76f0edeaf3</guid><dc:creator>Jakub Rzeszutko</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I have few additional questions:&lt;br /&gt;1. Do you process nrf_cli in main like in the example?&lt;/p&gt;
&lt;p&gt;2. May you try to increase buffers in NRF_CLI_UART_DEF: 64 -&amp;gt;1024 and 16-&amp;gt;1024? Does it change anything?&lt;/p&gt;
&lt;p&gt;3. Can you share your project? It will be hard to find the problem otherwise.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Lost LOGs - increase LOG backend queue size.</title><link>https://devzone.nordicsemi.com/thread/125015?ContentTypeID=1</link><pubDate>Mon, 19 Mar 2018 13:53:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4aab497b-4c24-4f74-84e2-19a5f9b4f8ce</guid><dc:creator>Dusan Daniska</dc:creator><description>&lt;p&gt;I am initializing the NRF_CLI using this piece of code:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;NRF_CLI_CMD_REGISTER(set, NULL, &amp;quot;help string test&amp;quot;, cli_cmd_set);
NRF_CLI_UART_DEF(m_cli_uart_transport, 0, 64, 16);
NRF_CLI_DEF(m_cli_uart, &amp;quot;sequoia: &amp;quot;, &amp;amp;m_cli_uart_transport.transport, &amp;#39;\r&amp;#39;, 4);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;When I increase the &amp;quot;4&amp;quot; in the NRF_CLI_DEF to e.g. &amp;quot;5&amp;quot;, the logs start to behave strangely, this is the output:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1521467487749v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;So even the error log is not complete...&lt;/p&gt;
&lt;p&gt;If I increase the value to something greater, e.g. &amp;quot;12&amp;quot;, I get this output:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1521467560878v2.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;-&amp;gt; I do not see the red error but I can see only first char of the &amp;quot;cli_prefix&amp;quot;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Lost LOGs - increase LOG backend queue size.</title><link>https://devzone.nordicsemi.com/thread/125007?ContentTypeID=1</link><pubDate>Mon, 19 Mar 2018 13:41:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8cdcc4df-d3bb-4ca9-ba52-25c27ce94f54</guid><dc:creator>Jakub Rzeszutko</dc:creator><description>&lt;p&gt;Hi Dusan,&lt;/p&gt;
&lt;p&gt;I assume you are referring to nrf_cli example.&lt;/p&gt;
&lt;p&gt;In the main.c you need to update&amp;nbsp;define:&amp;nbsp;&lt;span&gt;CLI_EXAMPLE_LOG_QUEUE_SIZE used in the&amp;nbsp;&lt;/span&gt;macro NRF_CLI_DEF. By default it has value == 4.&lt;/p&gt;
&lt;p&gt;You can always run command: &lt;em&gt;cli_stats&lt;/em&gt; to check queue usage.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Lost LOGs - increase LOG backend queue size.</title><link>https://devzone.nordicsemi.com/thread/125001?ContentTypeID=1</link><pubDate>Mon, 19 Mar 2018 13:31:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:20267af4-bbdb-486c-81ac-01b8c40b1102</guid><dc:creator>Dusan Daniska</dc:creator><description>&lt;p&gt;I am using CLI with Logger and I can see this in the terminal:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1521466282358v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;And also I can not see some logs&amp;nbsp;that I am expecting.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Lost LOGs - increase LOG backend queue size.</title><link>https://devzone.nordicsemi.com/thread/124981?ContentTypeID=1</link><pubDate>Mon, 19 Mar 2018 12:48:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:738decb3-5e86-441f-9d8f-a32064195454</guid><dc:creator>Jakub Rzeszutko</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;How do you know you are loosing logs?&lt;/p&gt;
&lt;p&gt;Do you use CLI with Logger or only Logger module?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>