polserver/pol-core/pol/checkpnt.cpp
turleypol d848deae18
POLLOG* macros use the new formatting (#598)
* POLLOG* macros use the new formatting
removed all old logging functions

* removed old fmt lib from everything except StreamWriter
removed unneeded functions

* fixed review comments
2024-01-16 17:55:42 +01:00

33 lines
618 B
C++

/** @file
*
* @par History
*/
#include "checkpnt.h"
#include "../clib/logfacility.h"
#include "../plib/systemstate.h"
#include "globals/state.h"
namespace Pol
{
namespace Core
{
void checkpoint( const char* msg, unsigned short minlvl /* = 11 */ )
{
Core::stateManager.last_checkpoint = msg;
if ( Plib::systemstate.config.loglevel >= minlvl )
{
POLLOG_INFOLN( "checkpoint: {}", msg );
}
}
Checkpoint::Checkpoint( const char* file ) : _file( file ), _line( 0 ) {}
Checkpoint::~Checkpoint()
{
if ( _line )
POLLOG_ERRORLN( "Abnormal end after checkpoint: File {}, line {}", _file, _line );
}
}
}