blob: 428d5a4df81b960f2b418d71a9d95e5378b97a5a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
#include "debug.h"
#ifdef DEBUG_ENABLED
namespace ledger {
std::ostream * debug_stream = &std::cerr;
bool free_debug_stream = false;
static class free_streams
{
public:
~free_streams() {
if (free_debug_stream && debug_stream) {
delete debug_stream;
debug_stream = NULL;
}
}
} _debug_cleanup;
} // namespace ledger
#endif DEBUG_ENABLED
|