Logger / Loglevel

Top  Previous  Next

Logging gives outputs regarding system state and runtime information to a given file to check what happens in the runtime of the software. Therefore in SIMPLACE the log4j framework is used (org.apache.log4j.Logger). Usually, SIMPLACE can be attributed by 5 categories of loglevels.

 

TRACE: Debug information for special purposes and output as logfile in DEBUG

DEBUG: Gives the DEBUG information. Generally, it contains a series of information regarding the run and the processes occurred during the simulation.

INFO: Gives the state information of the software.

WARN: Warns for exceptions, those can be solved automatically.

ERROR: Gives some errors for the run those cannot be solved automatically.

FATAL: Usually a rare one that indicates the crush of the whole system.

 

Setting Loglevel is done in Java Code using the Method:                

 

Logger.setLogLevel(LOGLEVEL.[LOGLEVEL]);

 

Log output is generated in Java Code using the call:

 

if(Logger.is[LOGLEVEL]) Logger.[LOGLEVEL](String, [exception], this-class-reference). The if is checked to prevent the creation of an unused String reference.

 

In the GUI the loglevel can be temporary reset to DEBUG by clicking Options/More Log output.

 

All the information written as loglevel can be found in workspace_4.0\simplace_run\conf folder as log4j.xml file.