Menu

#27 Launcher::setLogLevel() doesn't work

SOF_1.2_11050
open
nobody
SOF (10)
5
2011-12-28
2011-12-28
Levski Weng
No

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?

Discussion

  • Levski Weng

    Levski Weng - 2011-12-28

    The version of SOF is : sof_1.3_11090

     
  • Levski Weng

    Levski Weng - 2011-12-28
    • labels: --> SOF
    • milestone: --> SOF_1.2_11050
     
  • magr74

    magr74 - 2012-01-09

    On which platform (Windows,Linux) did you notice this problem?

     
  • Levski Weng

    Levski Weng - 2012-01-11

    I tested sof on Windows XP, with compiler Visual Studio 2008

     
  • magr74

    magr74 - 2012-01-19

    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.

     
Auth0 Logo