2016-01-28 14:52:40 +01:00
|
|
|
/** @file
|
|
|
|
|
*
|
|
|
|
|
* @par History
|
|
|
|
|
*/
|
2016-02-11 22:54:43 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
#include "checkpnt.h"
|
|
|
|
|
|
|
|
|
|
#include "../clib/logfacility.h"
|
2018-01-29 21:55:48 +01:00
|
|
|
#include "../plib/systemstate.h"
|
2016-02-11 22:54:43 +01:00
|
|
|
#include "globals/state.h"
|
|
|
|
|
|
2016-02-19 19:26:35 +01:00
|
|
|
namespace Pol
|
|
|
|
|
{
|
|
|
|
|
namespace Core
|
|
|
|
|
{
|
|
|
|
|
void checkpoint( const char* msg, unsigned short minlvl /* = 11 */ )
|
|
|
|
|
{
|
|
|
|
|
Core::stateManager.last_checkpoint = msg;
|
|
|
|
|
if ( Plib::systemstate.config.loglevel >= minlvl )
|
|
|
|
|
{
|
2024-01-16 17:55:42 +01:00
|
|
|
POLLOG_INFOLN( "checkpoint: {}", msg );
|
2016-02-11 22:54:43 +01:00
|
|
|
}
|
2016-02-19 19:26:35 +01:00
|
|
|
}
|
|
|
|
|
|
2018-01-29 21:55:48 +01:00
|
|
|
Checkpoint::Checkpoint( const char* file ) : _file( file ), _line( 0 ) {}
|
2016-02-19 19:26:35 +01:00
|
|
|
Checkpoint::~Checkpoint()
|
|
|
|
|
{
|
|
|
|
|
if ( _line )
|
2024-01-16 17:55:42 +01:00
|
|
|
POLLOG_ERRORLN( "Abnormal end after checkpoint: File {}, line {}", _file, _line );
|
2016-02-19 19:26:35 +01:00
|
|
|
}
|
|
|
|
|
}
|
2018-01-29 21:55:48 +01:00
|
|
|
}
|