<?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>Setting log level by backend</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/77170/setting-log-level-by-backend</link><description>Hello, 
 
 I&amp;#39;m not sure if this is possible, but I would like to filter log level depending on which backend is receiving them. For example I would like to set the RTT to debug and add a flashlog backend as well that is set to info or higher. I can only</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 08 Jul 2021 09:21:08 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/77170/setting-log-level-by-backend" /><item><title>RE: Setting log level by backend</title><link>https://devzone.nordicsemi.com/thread/319104?ContentTypeID=1</link><pubDate>Thu, 08 Jul 2021 09:21:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0f91a71d-1ff3-4134-83f7-8d71cef52dd3</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi Mike&lt;/p&gt;
&lt;p&gt;Thanks for elaborating, now it is clear &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;This is not possible unfortunately. The system is&amp;nbsp;only designed to allow one backend at a time.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Setting log level by backend</title><link>https://devzone.nordicsemi.com/thread/318982?ContentTypeID=1</link><pubDate>Wed, 07 Jul 2021 12:50:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:96dd8022-8d82-4e2a-996c-d9d58cdd3b52</guid><dc:creator>Mike</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;span&gt;Torbj&amp;oslash;rn,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks for your reply. I think I wasn&amp;#39;t clear in my question. Although I think I could use your suggestion of changing backends by configuration, what I would prefer to do is in have a single&amp;nbsp;build configure simultaneous multiple backends. One RTT and one flash. I would like the RTT backend to log DEBUG and higher and the flash backend to log at INFO and higher in this one build. This would allow me to view additional debug information when connected to a&amp;nbsp;debugger and not fill up the flash.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;Is this possible?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;Regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;Mike&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Setting log level by backend</title><link>https://devzone.nordicsemi.com/thread/318978?ContentTypeID=1</link><pubDate>Wed, 07 Jul 2021 12:40:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:598417c7-6d81-4570-8af3-ec252fd55192</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi Mike&lt;/p&gt;
&lt;p&gt;For clarity, which SDK version are you using?&lt;/p&gt;
&lt;p&gt;It should be possible to&amp;nbsp;define a higher level log setting that automatically configures the backend and log level as you want, based on a single configuration parameter.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Something like this:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;// APP_LOG_MODE 0 for RTT logging
// APP_LOG_MODE 1 for flash logging
#define APP_LOG_MODE 0 

#if(APP_LOG_MODE == 0)

// Set the backend and log level accordingly

#elif(APP_LOG_MODE == 1)

// Set the backend and log level accordingly

#endif&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Then all you have to do is change a single parameter to switch between the two, and you can easily associate this with a dedicated debug and release build if you want.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>