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,<br /> Could you try building and running the following Native Library sample code:<br /> <a href="/system/files/SpokesNativeSample.zip">/system/files/SpokesNativeSample.zip</a><br /> <br /> In my testing this example program does not generate any debug logging with native lib.<br /> <br /> I also recommend you use latest 3.9 SDK from here: <a href="/sdks">http://developer.plantronics.com/sdks</a><br /> <br /> <br /> Let me know<br /> Thanks,<br /> Lewis.<br /> &nbsp;

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

lcollins
Hi,<br /> If you install Plantronics Hub again, it generates a folder called:<br /> C:\ProgramData\Plantronics\Spokes3G log4cxx<br /> with a file in it called&nbsp;Spokes.log4cxx<br /> <br /> If you make a copy of that folder and file (just zip it), now uninstall Hub.<br /> <br /> If you now restore the folder and file (unzip it) again...&nbsp;<br /> <br /> 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).<br /> <br /> Thanks,<br /> Lewis

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

lcollins
Hi Victor,<br /> 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.<br /> If you would like to repost the comment I would be happy to assist.<br /> Thanks,<br /> Lewis.<br /> &nbsp;

vikkolesnyk
Lewis,<br /> <br /> Thank you for response.<br /> I&#39;m reposting my comment:<br /> <br /> 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.<br /> I propose to add &quot;void SetLoggingEnabled(bool enabled)&quot; function to native API (Spokes3G.h) and its implementation hiden inside private Plantronics call and included in Spokes.dll.<br /> This is the way I believe it should correctly works.<br /> <br /> Hope for understanding, Viktor.<br /> <br /> &nbsp;

lcollins
Hi Viktor,<br /> <br /> I have found another way to address the issue of unwanted logging!<br /> <br /> You can include Spokes.log4cxx file within your own application&#39;s runtime folder, then include the following line of code before InitSpokesRuntime():<br /> <br /> &nbsp;&nbsp;&nbsp; <strong>InitLogger(&quot;.\\Spokes.log4cxx&quot;);</strong><br /> &nbsp;&nbsp; &nbsp;InitSpokesRuntime();<br /> <br /> Now it will load Spokes.log4cxx from your application&#39;s runtime folder, which will effectively suppress the logging.<br /> <br /> Note: You can obtain a copy of Spokes.log4cxx by installing Hub SDK and looking in C:\ProgramData\Plantronics\Spokes3G log4cxx.<br /> <br /> Thanks,<br /> Lewis.

Add new comment