polserver/pol-core/pol/checkpnt.cpp
turleypol 21577d8e5b
Clang Tidy concat namespaces (#855)
* tidy

* Automated clang-tidy change: modernize-concat-nested-namespaces

* compile test

* fix namespace

---------

Co-authored-by: Clang Tidy <clang-tidy@users.noreply.github.com>
2026-01-17 10:30:21 +01:00

31 lines
630 B
C++

/** @file
*
* @par History
*/
#include "checkpnt.h"
#include "../clib/logfacility.h"
#include "../plib/systemstate.h"
#include "globals/state.h"
namespace Pol::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 );
}
} // namespace Pol::Core