mirror of
https://github.com/polserver/polserver
synced 2026-08-13 08:23:08 -04:00
* tidy * Automated clang-tidy change: modernize-concat-nested-namespaces * compile test * fix namespace --------- Co-authored-by: Clang Tidy <clang-tidy@users.noreply.github.com>
31 lines
630 B
C++
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
|