OpenHome Forum
[Solved] What does the stack log? - Printable Version

+- OpenHome Forum (http://forum.openhome.org)
+-- Forum: OpenHome (/forumdisplay.php?fid=1)
+--- Forum: Net (/forumdisplay.php?fid=5)
+--- Thread: [Solved] What does the stack log? (/showthread.php?tid=1547)



[Solved] What does the stack log? - ChriD - 14-11-2016 06:44 PM

Hi, I want to log the logs from the UPNP Stack. Therfore i did this

Code:
...
initParams = OpenHome::Net::InitialisationParams::Create();                                                      
initParams->SetLogOutput(OpenHome::MakeFunctorMsg(*this, &UPNPManager::upnpStackLog));
OpenHome::Net::UpnpLibrary::Initialise(initParams);
...

void UPNPManager::upnpStackLog(const char* _log)
{
    logDebug(_log, CURRENT_POSITION);
}

But upnpStackLog is never called.
Is there any option for setting the log level? What will be logged?

Thanks!


RE: What does the stack log? - simonc - 15-11-2016 08:39 AM

(14-11-2016 06:44 PM)ChriD Wrote:  Is there any option for setting the log level? What will be logged?

You can enable logging for various areas by calling Debug::AddLevel(), specifying level(s) defined in the Debug class. What gets logged for each level will hopefully be obvious. Just ask if any are unclear.


RE: What does the stack log? - ChriD - 15-11-2016 05:14 PM

Perfect!
Thank you!