tlx
logger.hpp
Go to the documentation of this file.
1 /*******************************************************************************
2  * tlx/logger.hpp
3  *
4  * Simple logging methods using ostream output.
5  *
6  * Part of tlx - http://panthema.net/tlx
7  *
8  * Copyright (C) 2018 Timo Bingmann <tb@panthema.net>
9  *
10  * All rights reserved. Published under the Boost Software License, Version 1.0
11  ******************************************************************************/
12 
13 #ifndef TLX_LOGGER_HEADER
14 #define TLX_LOGGER_HEADER
15 
16 #include <tlx/logger/core.hpp>
17 
18 namespace tlx {
19 
20 //! Explicitly specify the condition for logging
21 #define LOGC(cond) TLX_LOGC(cond)
22 
23 //! Default logging method: output if the local debug variable is true.
24 #define LOG LOGC(debug)
25 
26 //! Override default output: never or always output log.
27 #define LOG0 LOGC(false)
28 #define LOG1 LOGC(true)
29 
30 //! Explicitly specify the condition for logging
31 #define sLOGC(cond) TLX_sLOGC(cond)
32 
33 //! Default logging method: output if the local debug variable is true.
34 #define sLOG sLOGC(debug)
35 
36 //! Override default output: never or always output log.
37 #define sLOG0 sLOGC(false)
38 #define sLOG1 sLOGC(true)
39 
40 } // namespace tlx
41 
42 #endif // !TLX_LOGGER_HEADER
43 
44 /******************************************************************************/