Launcher::setLogLevel() doesn't work
Brought to you by:
magr74
I use the following code in a console app:
Launcher<SingleThreaded,CREATOR> launcher;
launcher.setLogLevel(Logger::LOG_NOLOG);
launcher.start( bundleConfVec );
But the console still output the DEBUG log information to the console. Is it a bug or It's my misunderstanding of the setLogLevel() method?
The version of SOF is : sof_1.3_11090
On which platform (Windows,Linux) did you notice this problem?
I tested sof on Windows XP, with compiler Visual Studio 2008
I can not reproduce the problem. I instrumented the LauncherTest class of the 'sof_test' project:
********** Code - begin **************
TEST( Launcher, Load )
{
UnitTestLogger::getInstance().log( Logger::LOG_DEBUG, "[LauncherTest] *** Launcher-Load Test" );
BundleConfiguration bundleConf1( "bundle1", "BundleActivator2", ".", DLL2 );
BundleConfiguration bundleConf2( "bundle2", "TestBundleActivator" );
vector<BundleConfiguration> bundleConfVec;
bundleConfVec.push_back( bundleConf1 );
bundleConfVec.push_back( bundleConf2 );
Launcher<SingleThreaded,CREATOR> launcher;
launcher.setLogLevel( Logger::LOG_NOLOG ); // setting log level to NOLOG
launcher.start( bundleConfVec );
}
*********** Code - end *****************
If I execute the test before and after adding the 'NOLOG' line, I can see that all log messages after the NOLOG statement are not dumped.
Can you attach your log please?
Note: The NOLOG statement is not effective for any DLLs which are loaded as bundles. For this you have to add the NOLOG statement in the DLL as well.