Pol  Revision:cb584c9
tracebuf.cpp
Go to the documentation of this file.
1 
7 #include "tracebuf.h"
8 
9 #ifndef NDEBUG
10 #include "logfacility.h"
11 #include <format/format.h>
12 #endif
13 
14 namespace Pol
15 {
16 namespace Clib
17 {
18 #ifndef NDEBUG
21 #endif
22 
24 {
25 #ifndef NDEBUG
26  fmt::Writer tmp;
27  tmp << "TraceBuffer:\n";
28  for ( unsigned i = tracebuffer_insertpoint; i < TRACEBUF_DEPTH; ++i )
29  {
30  if ( tracebuffer[i].tag )
31  tmp << tracebuffer[i].tag << "=" << tracebuffer[i].value << "\n";
32  }
33  for ( unsigned i = 0; i < tracebuffer_insertpoint; ++i )
34  {
35  if ( tracebuffer[i].tag )
36  tmp << tracebuffer[i].tag << "=" << tracebuffer[i].value << "\n";
37  }
38  tmp << "End of TraceBuffer.\n";
39  POLLOG << tmp.str();
40 #endif
41 }
42 }
43 }
void LogTraceBuffer()
Definition: tracebuf.cpp:23
#define TRACEBUF_DEPTH
Definition: tracebuf.h:17
TraceBufferElem tracebuffer[TRACEBUF_DEPTH]
Definition: tracebuf.cpp:19
#define POLLOG
Definition: logfacility.h:219
unsigned tracebuffer_insertpoint
Definition: tracebuf.cpp:20
Definition: berror.cpp:12