Go to the documentation of this file.
29 #include <boost/call_traits.hpp>
30 #include <boost/ref.hpp>
31 #include <miaconfig.h>
38 #ifndef VSTREAM_DOMAIN
39 #define VSTREAM_DOMAIN "**"
83 void set_verbosity(Level l);
93 std::ostream& set_stream(std::ostream& os);
101 bool shows(Level l)
const;
104 bool show_debug()
const;
119 if (m_message_level >= m_output_level)
136 static void set_output_target(std::ostream* os);
141 operator std::ostream& () {
148 static std::ostream* m_output_target;
149 static __thread std::ostream* m_output;
150 Level m_output_level;
151 static __thread Level m_message_level;
174 return l >= m_output_level;
182 m_fill(m_depth,
' ') {
184 << m_fill <<
"enter " << m_domain <<
"\n";
189 << m_fill <<
"leave " << m_domain <<
"\n";
193 const char *m_domain;
196 static __thread
size_t m_depth;
200 #ifndef ENABLE_DEBUG_MESSAGES
201 #define TRACE(DOMAIN)
202 #define TRACE_FUNCTION
203 #define FUNCTION_NOT_TESTED
237 #define TRACE(DOMAIN) ::mia::CTrace _xxx_trace(DOMAIN)
240 #define TRACE_FUNCTION ::mia::CTrace _xxx_trace(__PRETTY_FUNCTION__)
243 #define FUNCTION_NOT_TESTED ::mia::cvwarn() << __PRETTY_FUNCTION__ << ":not tested\n"
267 return m_output_level;
331 #define cverb ::mia::vstream::instance()
std::ostream & operator<<(std::ostream &os, const CAttribute &attr)
CDebugSink & operator<<(std::ostream &(*)(std::ostream &))
vstream & cvinfo()
informal output that may be of interest to understand problems with a program and are of higher prior...
static vstream & instance()
void set_verbose(bool verbose)
#define NS_MIA_BEGIN
conveniance define to start the mia namespace
A output stream to enable certain levels of verbosity.
vstream & cvfatal()
direct output to this stream adapter to print out fatalities in the code
#define NS_MIA_END
conveniance define to end the mia namespace
vstream & cvwarn()
send warnings to this stream adapter
CDebugSink & operator<<(const T &val)
A mapper from emums to string values. - usefull for names flags.
const EXPORT_CORE TDictMap< vstream::Level > g_verbose_dict
Dictonary for the verbosity of the logging as used by –verbose comand line option.
vstream & cvmsg()
send messages to this stream adapter
#define EXPORT_CORE
Macro to manage Visual C++ style dllimport/dllexport.
vstream::Level get_level() const
vstream & cvfail()
direct output to this stream adapter to print out failtures in tests beyond BOOST_FAIL
bool shows(Level l) const
void flush()
write pending output
CTrace(const char *domain)
vstream & cverr()
send errors to this stream adapter