mirror of
https://github.com/polserver/polserver
synced 2026-08-13 08:23:08 -04:00
* 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
33 lines
618 B
C++
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 );
|
|
}
|
|
}
|
|
}
|