<?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>about nsc logging</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/124915/about-nsc-logging</link><description>I&amp;#39;m using the RTT log feature in NCS, and here is my prj.conf:I have two questions: 
 
 After using LOG_INF to output logs, I feel the logs are not output immediately. Since I have enabled CONFIG_LOG_MODE_DEFERRED=y , I can understand this phenomenon</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 21 Oct 2025 12:15:00 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/124915/about-nsc-logging" /><item><title>RE: about nsc logging</title><link>https://devzone.nordicsemi.com/thread/552063?ContentTypeID=1</link><pubDate>Tue, 21 Oct 2025 12:15:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:028d4d22-9358-48e8-8e77-19fe945fc95b</guid><dc:creator>Menon</dc:creator><description>&lt;p&gt;Hello,&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
[quote user=""]After using&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code&gt;LOG_INF&lt;/code&gt;to output logs, I feel the logs are not output immediately. Since I have enabled&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code&gt;CONFIG_LOG_MODE_DEFERRED=y&lt;/code&gt;, I can understand this phenomenon. However, some logs are even delayed by about one second before output, which doesn&amp;#39;t look ideal. I want to ask: in the nRF5 SDK (52 series), I could call&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code&gt;NRF_LOG_PROCESS()&lt;/code&gt;in the main function&amp;#39;s while(1) loop to quickly flush logs. How can I achieve quick log flushing in NCS?[/quote]
&lt;p&gt;I think you can use the &lt;code&gt;log_flush()&lt;/code&gt; function from Zephyr, which processes all pending log messages and flushes them immediately. check the&lt;a href="https://docs.zephyrproject.org/apidoc/latest/group__log__ctrl.html#ga8cc1f56ae6020fb9cc9c40be7cf18910"&gt; implementation and details in the Zephyr source&lt;/a&gt;.&lt;/p&gt;
[quote user=""]Even though I have enabled&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code&gt;CONFIG_LOG_MODE_DEFERRED=y&lt;/code&gt;, the&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code&gt;LOG_INF&lt;/code&gt;operation itself still takes quite some time. I tested it with GPIO and found it takes up to 20-30 us. This makes it inconvenient for me to use&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code&gt;LOG_INF&lt;/code&gt;in interrupt service routines. I remember when using Segger debugging with nRF5 SDK (52833), even with&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code&gt;LOG_DEFERRED&lt;/code&gt;enabled,&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code&gt;NRF_LOG_INFO&lt;/code&gt;only took about 1-2 us. So in NCS, are there any methods to optimize the log operation time? What additional steps should I take?[/quote]
&lt;p&gt;For the speed optimization, could you include the following configs and let me know if it makes any difference?&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_LOG=y
CONFIG_LOG_MODE_DEFERRED=y
CONFIG_LOG_SPEED=y
CONFIG_LOG_SIMPLE_MSG_OPTIMIZE=y
CONFIG_LOG_BUFFER_SIZE=4096
CONFIG_LOG_MODE_OVERFLOW=y

CONFIG_LOG_RATELIMIT=y
CONFIG_LOG_RATELIMIT_INTERVAL_MS=500&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Kind Regards,&lt;/p&gt;
&lt;p&gt;Abhijith&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: about nsc logging</title><link>https://devzone.nordicsemi.com/thread/551504?ContentTypeID=1</link><pubDate>Wed, 15 Oct 2025 02:06:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5479312a-c6b7-402d-b9a1-985b26f5106f</guid><dc:creator>Liny</dc:creator><description>&lt;p&gt;sdk ncs 3.0.2 ,its NRF54L15DK,&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;div class="host-lopnbnfpjmgpbppclhclehhgafnifija" style="position:relative;"&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: about nsc logging</title><link>https://devzone.nordicsemi.com/thread/551419?ContentTypeID=1</link><pubDate>Tue, 14 Oct 2025 12:08:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:027a6d37-008c-4ee9-969b-abcf2a5a6e27</guid><dc:creator>Menon</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Could you please tell me which SDK version you are using? Also, is this a custom board or a DK? Could you also please specify which Nordic chip or DK you are working with.&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt; Abhijith&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>