8 posts / 0 new
Last post
ibiernacki
Logger
Hi, ​How can I disable output logs from native library in debug mode? Regards, Ignacy

lcollins
Hi,
Could you try building and running the following Native Library sample code:
/system/files/SpokesNativeSample.zip

In my testing this example program does not generate any debug logging with native lib.

I also recommend you use latest 3.9 SDK from here: http://developer.plantronics.com/sdks


Let me know
Thanks,
Lewis.
 

ibiernacki
Hello, I ran sample application against latest SDK - there were no logs generated on the console. But when I moved all required files (Spokes.dll, Spokes.lib, log4cxx.xml, PlantronicsDevices.xml, pltlog4cpp.dll and "include" directory) into my project, modified include paths and uninstalled hub, all the logs are being generated again. Thanks in advance, Ignacy

lcollins
Hi,
If you install Plantronics Hub again, it generates a folder called:
C:\ProgramData\Plantronics\Spokes3G log4cxx
with a file in it called Spokes.log4cxx

If you make a copy of that folder and file (just zip it), now uninstall Hub.

If you now restore the folder and file (unzip it) again... 

Now if you run your Native Lib program it will no longer have the annoying debug!!!! (which was produced by Spokes.dll - the Spokes.log4cxx tells Spokes.dll what to do with the debug).

Thanks,
Lewis

vikkolesnyk
Icollins, Why did you remove my latest comment concerning this thread? You don't like comment contents that current way to disable logging is weird, don't you? Beginning of this comment is still in google's cache "Icollins, I experienced the same problem during building custom deployment of my application using Native API just puting...." You could check this by searching for "plantronics logger vikkolesnyk"  

lcollins
Hi Victor,
I apologise for the loss of your latest comment. It was not intentional but the result of site maintenance when we recently updated the site contents.
If you would like to repost the comment I would be happy to assist.
Thanks,
Lewis.
 

vikkolesnyk
Lewis, Thank you for response. I'm reposting my comment: I think current way of configuring whethere log is enabled or not (have file with specific name is specific harcoded name folder) is very inconvenient. I propose to add "void SetLoggingEnabled(bool enabled)" function to native API (Spokes3G.h) and its implementation hiden inside private Plantronics call and included in Spokes.dll. This is the way I believe it should correctly works. Hope for understanding, Viktor.  

lcollins
Hi Viktor,

I have found another way to address the issue of unwanted logging!

You can include Spokes.log4cxx file within your own application's runtime folder, then include the following line of code before InitSpokesRuntime():

    InitLogger(".\\Spokes.log4cxx");
    InitSpokesRuntime();

Now it will load Spokes.log4cxx from your application's runtime folder, which will effectively suppress the logging.

Note: You can obtain a copy of Spokes.log4cxx by installing Hub SDK and looking in C:\ProgramData\Plantronics\Spokes3G log4cxx.

Thanks,
Lewis.

Add new comment