Pol  Revision:cb584c9
checkpnt.cpp
Go to the documentation of this file.
1 
7 #include "checkpnt.h"
8 
9 #include "../clib/logfacility.h"
10 #include "../plib/systemstate.h"
11 #include "globals/state.h"
12 
13 namespace Pol
14 {
15 namespace Core
16 {
17 void checkpoint( const char* msg, unsigned short minlvl /* = 11 */ )
18 {
20  if ( Plib::systemstate.config.loglevel >= minlvl )
21  {
22  POLLOG_INFO << "checkpoint: " << msg << "\n";
23  }
24 }
25 
26 Checkpoint::Checkpoint( const char* file ) : _file( file ), _line( 0 ) {}
28 {
29  if ( _line )
30  POLLOG_ERROR << "Abnormal end after checkpoint: File " << _file << ", line " << _line << "\n";
31 }
32 }
33 }
const char * last_checkpoint
Definition: state.h:33
SystemState systemstate
Definition: systemstate.cpp:12
#define POLLOG_INFO
Definition: logfacility.h:213
#define POLLOG_ERROR
Definition: logfacility.h:207
void checkpoint(const char *msg, unsigned short minlvl)
Definition: checkpnt.cpp:17
const char * _file
Definition: checkpnt.h:28
StateManager stateManager
Definition: state.cpp:8
Checkpoint(const char *file)
Definition: checkpnt.cpp:26
Definition: berror.cpp:12