<?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>Using multiple NRF_LOG backends at once</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/17362/using-multiple-nrf_log-backends-at-once</link><description>I&amp;#39;d like to log some debug stuff to a mobile app over BLE, when in a connection, using the NRF_LOG library and the Nordic UART service. I have this working just fine without NRF_LOG, just using printf() calls for the log statements and then re-wiring</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 09 Nov 2016 12:41:00 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/17362/using-multiple-nrf_log-backends-at-once" /><item><title>RE: Using multiple NRF_LOG backends at once</title><link>https://devzone.nordicsemi.com/thread/66750?ContentTypeID=1</link><pubDate>Wed, 09 Nov 2016 12:41:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f490af09-564d-4f3b-92c5-e307e8b523f2</guid><dc:creator>Eliot Stock</dc:creator><description>&lt;p&gt;I ended up just reimplementing the default handler and adding my BLE stuff to it. Accepting this answer though, thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using multiple NRF_LOG backends at once</title><link>https://devzone.nordicsemi.com/thread/66749?ContentTypeID=1</link><pubDate>Wed, 09 Nov 2016 12:37:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:65631e2d-e4ad-401d-9613-7dac6b2e1876</guid><dc:creator>Krzysztof Chruscinski</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;there is a macro called NRF_LOG_HANDLERS_SET() where you can provide functions for your backend. That would of course replace default handlers from nrf_log_backend_serial.c. You can try to create you backend that will wrap default backend and extend it. Something like:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;bool my_std_handler(....)
{
nrf_log_backend_serial_std_handler(...);
//customize handling
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And use NRF_LOG_HANDLERS_SET() to replace the default one.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>