Commit fd9aff89 authored by Mathias Goldau's avatar Mathias Goldau
Browse files

[ADD] New program option "-t" for profiling purposes

parent 035c3c18
......@@ -66,7 +66,8 @@ bool WQt4Gui::parseOptions()
// TODO(wiebel): this does not link on windows at the moment. But it should!
desc.add_options()
( "help,h", "Prints this help message" )
( "input,i", po::value< std::vector< std::string > >(), "Input data files that should be loaded automatically" );
( "input,i", po::value< std::vector< std::string > >(), "Input data files that should be loaded automatically" )
( "timed-output,t", "Flag indicating if all log strings should have a time string preceding" );
#endif
po::positional_options_description p;
......@@ -125,6 +126,11 @@ bool WQt4Gui::parseOptions()
{
std::cout << desc << std::endl;
}
else if( m_optionsMap.count( "timed-output" ) )
{
WLogger::getLogger()->setDefaultFormat( "[%t] *%l [%s] %m \n" );
wlog::info( "GUI" ) << "Timed output enabled";
}
return true;
}
......
......@@ -137,7 +137,7 @@ void WMData::moduleMain()
using wiotools::getSuffix;
std::string fileName = m_properties->getValue< std::string >( "filename" );
WLogger::getLogger()->addLogMessage( "Loading data from \"" + fileName + "\".", getName(), LL_DEBUG );
debugLog() << "Loading data from \"" << fileName << "\".";
m_properties->setValue( "name", fileName );
// load it now
......@@ -192,6 +192,7 @@ void WMData::moduleMain()
throw WDHException( "Unknown file type: '" + suffix + "'" );
}
debugLog() << "Loading data done.";
// notify
m_output->updateData( m_dataSet );
ready();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment