Skip to content
This repository was archived by the owner on May 18, 2019. It is now read-only.

Commit a94610a

Browse files
rfrankeOpenModelica-Hudson
authored andcommitted
Exploit structured logging for LOG_INIT and LOG_STATS
1 parent 7c61be0 commit a94610a

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

SimulationRuntime/cpp/Core/DataExchange/XmlPropertyReader.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ void XmlPropertyReader::readInitialValues(IContinuous& system, shared_ptr<ISimVa
4141

4242
ptree modelDescription = tree.get_child("ModelDescription");
4343

44+
LOGGER_WRITE_BEGIN("Initialize start values:", LC_INIT, LL_DEBUG);
4445
FOREACH(ptree::value_type const& vars, modelDescription.get_child("ModelVariables"))
4546
{
4647
if (vars.first == "ScalarVariable")
@@ -163,6 +164,7 @@ void XmlPropertyReader::readInitialValues(IContinuous& system, shared_ptr<ISimVa
163164
}
164165
}
165166
}
167+
LOGGER_WRITE_END(LC_INIT, LL_DEBUG);
166168
}
167169
catch(exception &ex)
168170
{

SimulationRuntime/cpp/Core/SimController/SimManager.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -300,15 +300,15 @@ void SimManager::stopSimulation()
300300

301301
void SimManager::writeProperties()
302302
{
303-
// declaration for Logging
304-
std::pair<LogCategory, LogLevel> logM = Logger::getLogMode(LC_SOLV, LL_INFO);
303+
// declaration for Logging
304+
std::pair<LogCategory, LogLevel> logM = Logger::getLogMode(LC_SOLV, LL_INFO);
305305

306-
LOGGER_WRITE_TUPLE("SimManager: Computation time", logM);
307-
LOGGER_WRITE_TUPLE("SimManager: Simulation end time: " + to_string(_tEnd), logM);
308-
//LOGGER_WRITE("Rechenzeit in Sekunden: " + to_string>(_tClockEnd-_tClockStart), logM);
306+
LOGGER_WRITE_TUPLE("SimManager: Simulation stop time: " + to_string(_tEnd), logM);
307+
//LOGGER_WRITE("Rechenzeit in Sekunden: " + to_string>(_tClockEnd-_tClockStart), logM);
309308

310-
LOGGER_WRITE_TUPLE("Simulation info from solver:", logM);
309+
LOGGER_WRITE_BEGIN("Simulation info from solver:", LC_SOLV, LL_INFO);
311310
_solver->writeSimulationInfo();
311+
LOGGER_WRITE_END(LC_SOLV, LL_INFO);
312312
/*
313313
// Zeit
314314
if(_settings->_globalSettings->bEndlessSim)

0 commit comments

Comments
 (0)