polserver/pol-core/pol/checkpnt.cpp
turleypol dbb25bdb62
Include and buildsystem cleanup (#45)
Include cleanup
Reworked buildsystem (Linux only)
Removed dynamic libs, Linux now again uses static linking (like windows)
2018-01-29 21:55:48 +01:00

33 lines
636 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_INFO << "checkpoint: " << msg << "\n";
}
}
Checkpoint::Checkpoint( const char* file ) : _file( file ), _line( 0 ) {}
Checkpoint::~Checkpoint()
{
if ( _line )
POLLOG_ERROR << "Abnormal end after checkpoint: File " << _file << ", line " << _line << "\n";
}
}
}