<?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_output_flush: is it usable with LOG_MODULE_REGISTER and LOG_DBG macros?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/112026/log_output_flush-is-it-usable-with-log_module_register-and-log_dbg-macros</link><description>Hi there, 
 In Zephyr 3.6.99 I see a promisive function to make sure that the logging buffer is flushed at a certain moment of time: log_output_flush . It is using a pointer to a structure of type log_output . Question: is that possible to use this function</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 09 Oct 2024 12:25:32 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/112026/log_output_flush-is-it-usable-with-log_module_register-and-log_dbg-macros" /><item><title>RE: log_output_flush: is it usable with LOG_MODULE_REGISTER and LOG_DBG macros?</title><link>https://devzone.nordicsemi.com/thread/505561?ContentTypeID=1</link><pubDate>Wed, 09 Oct 2024 12:25:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e9832e24-504c-4a21-91f6-c8fb35b11677</guid><dc:creator>Udi Vahaba</dc:creator><description>&lt;p&gt;Thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: log_output_flush: is it usable with LOG_MODULE_REGISTER and LOG_DBG macros?</title><link>https://devzone.nordicsemi.com/thread/505558?ContentTypeID=1</link><pubDate>Wed, 09 Oct 2024 12:14:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c55e682c-2e9d-4ecf-8a31-a936a962a0b3</guid><dc:creator>rdim</dc:creator><description>&lt;p&gt;Hi Udi,&lt;/p&gt;
&lt;p&gt;No, I did not find any appropriate solution so had to figure out what&amp;#39;s going on&amp;nbsp;using scope instead of logging.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: log_output_flush: is it usable with LOG_MODULE_REGISTER and LOG_DBG macros?</title><link>https://devzone.nordicsemi.com/thread/505493?ContentTypeID=1</link><pubDate>Wed, 09 Oct 2024 09:24:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e88e4896-8a11-4307-be4a-5638a63603f7</guid><dc:creator>Udi Vahaba</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;I&amp;#39;m looking to flush the RTT buffer periodically. Did you manage to use the &lt;code&gt;log_output_flush()&lt;/code&gt; function?&lt;/p&gt;
&lt;p&gt;If so, could you please share how to use it and how to get the struct pointer that needs to be passed to it?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: log_output_flush: is it usable with LOG_MODULE_REGISTER and LOG_DBG macros?</title><link>https://devzone.nordicsemi.com/thread/488559?ContentTypeID=1</link><pubDate>Wed, 12 Jun 2024 20:36:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cebffbb0-8d4f-4abb-bbd1-b8e9db4dd563</guid><dc:creator>rdim</dc:creator><description>&lt;p&gt;Hi Runar,&lt;/p&gt;
&lt;p&gt;Thanks for your answer, but my question was about how to access its parameter (&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;const struct&amp;nbsp;&lt;a class="el" href="https://docs.zephyrproject.org/apidoc/latest/structlog__output.html"&gt;log_output&lt;/a&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&amp;nbsp;*output&lt;/span&gt;) from the code that is using LOG_DBG macros (that is not defining &lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;log_output&lt;/span&gt; structure in that code).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;For example, how would I finalize this snippet:&lt;/span&gt;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;#include &amp;lt;zephyr/logging/log.h&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;#include &amp;lt;zephyr/logging/log_output.h&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;LOG_MODULE_REGISTER(main, LOG_LEVEL_DBG);&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;int main()&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;{&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&amp;nbsp; &amp;nbsp;LOG_DBG(&amp;quot;Hello, World!&amp;quot;);&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&amp;nbsp; &amp;nbsp;log_output_flush(&lt;/span&gt; &lt;span style="color:#ff0000;font-family:&amp;#39;comic sans ms&amp;#39;, &amp;#39;comic sans&amp;#39;, sans-serif;"&gt;&amp;lt;what do I specify here?&amp;gt;&lt;/span&gt;)&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&amp;nbsp; &amp;nbsp;return 0;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;}&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks again for your help!&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: log_output_flush: is it usable with LOG_MODULE_REGISTER and LOG_DBG macros?</title><link>https://devzone.nordicsemi.com/thread/488504?ContentTypeID=1</link><pubDate>Wed, 12 Jun 2024 12:59:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1ed50c43-3556-453b-be11-8689916bb40d</guid><dc:creator>runsiv</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;From what I can see&amp;nbsp;&lt;span&gt;log_output_flush&lt;/span&gt; is&amp;nbsp;already in the SDK(alt least in NCS 2.6)&amp;nbsp;where as the struct log_output is already in the sdk and can be found &lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/4f182bc4e3fb617903a5fbed2bc1e02e86d1c1cf/include/zephyr/logging/log_output.h#L96"&gt;here&lt;/a&gt;.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;
&lt;p&gt;Runar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>