<?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>LOG module thread priority</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/112395/log-module-thread-priority</link><description>Hi, I read somewhere that the LOG module works differently from printk() and uses a separate thread or so. But I couldn&amp;#39;t find any information which priority this thread uses (or in which context the LOG module&amp;#39;s handler runs). 
 I have strange situations</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 24 Jun 2024 18:27:54 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/112395/log-module-thread-priority" /><item><title>RE: LOG module thread priority</title><link>https://devzone.nordicsemi.com/thread/490422?ContentTypeID=1</link><pubDate>Mon, 24 Jun 2024 18:27:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0c2f47f9-ce6b-493f-888e-bcee013efac2</guid><dc:creator>puz_md</dc:creator><description>&lt;p&gt;Thanks Vidar, this really helped!&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Michael&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LOG module thread priority</title><link>https://devzone.nordicsemi.com/thread/490160?ContentTypeID=1</link><pubDate>Mon, 24 Jun 2024 07:45:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1d17de18-9f08-48da-9da8-d98b55333cca</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi &lt;span&gt;Michael&lt;/span&gt;,&lt;/p&gt;
&lt;p&gt;The &lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/3d2f1c7f0558d76b24afdabbaff6d36ea96db768/subsys/logging/Kconfig.processing#L53"&gt;logger processing thread &lt;/a&gt;is used when using it in deferred mode (CONFIG_LOG_MODE_DEFERRED=y - selected by default), and the priority&amp;nbsp;of this thread is&amp;nbsp;set to the lowest application priority (K_LOWEST_APPLICATION_THREAD_PRIO) unless the app defines a custom LOG_PROCESS_THREAD_CUSTOM_PRIORITY value.&lt;/p&gt;
[quote user=""]I have strange situations where LOG_INF() messages don&amp;#39;t work anymore, even though I call k_msleep() in the main thread. Any ideas? It might also be realted to enabling apairing/bonding features in proj.conf, I&amp;#39;m still researching the reason. But it would help understanding how the control flow of the LOG module works...[/quote]
&lt;p&gt;This suggests that the idle and logger thread are never allowed to run. Enabling the&amp;nbsp;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-2.6.1/page/zephyr/services/debugging/thread-analyzer.html"&gt;Thread analyzer&lt;/a&gt;&amp;nbsp;may help you find out which thread is blocking your logger. You will need to select&amp;nbsp;LOG_MODE_IMMEDIATE, or change the priority of the logger thread through&amp;nbsp; CONFIG_LOG_PROCESS_THREAD_CUSTOM_PRIORITY to get the log output from the thread analyzer.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>