Hall-D Software  alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
debug.h
Go to the documentation of this file.
1 /*! \file debug.h
2  *
3  * \brief debugging/logging support
4  *
5  */
6 
7 
8 #ifndef XSTREAM_DEBUG_H
9 #define XSTREAM_DEBUG_H
10 
11 #include <xstream/config.h>
12 
13 #if ENABLE_LOGGING
14 
15 #include <iostream>
16 
17 namespace xstream{
18 
19 extern std::ostream* debug;
20 
21 } // namespace xstream
22 
23 /*! \brief logging macro using an ostream
24  */
25 
26 #define LOG(d) do {(*debug) << "[" << (__FILE__) << ": " << __LINE__ << "]\t" << d << std::endl;} while (0)
27 
28 #else
29 
30 #define LOG(s)
31 
32 #endif
33 
34 #endif
bool debug