24 #ifndef __SWRE_TRACER_H__
25 #define __SWRE_TRACER_H__
27 #include <Safir/Application/Internal/SwReportExportDefs.h>
28 #include <Safir/Application/Internal/TraceStreamBuffer.h>
72 typedef std::basic_ios<wchar_t, std::char_traits<wchar_t> > ios_type;
74 typedef std::basic_ostream<wchar_t, std::char_traits<wchar_t> >
stream_type;
81 explicit Tracer(
const std::wstring & prefix);
93 void Enable(
const bool enabled) {
if (m_isEnabled == NULL) {InitializeEnabledHandling();} *m_isEnabled = enabled;}
100 inline bool IsEnabled()
const {
if (m_isEnabled == NULL) {InitializeEnabledHandling();}
return *m_isEnabled;}
169 void InitializeEnabledHandling()
const;
171 mutable stream_type m_ostream;
172 mutable Internal::TraceStreamBuffer m_buf;
173 mutable volatile bool * m_isEnabled;
A class for trace logging.
Definition: Tracer.h:69
std::basic_ostream< wchar_t, std::char_traits< wchar_t > > stream_type
Definition: Tracer.h:74
void Enable(const bool enabled)
Turn logging of this prefix on or off.
Definition: Tracer.h:93
bool IsEnabled() const
Check whether this prefix is enabled or not.
Definition: Tracer.h:100
This class just contains two static methods, for starting and stopping the tracers backdoor...
Definition: Tracer.h:39
Common base class for connections to the DOB.
Definition: ConnectionBase.h:52
static std::wostream & operator<<(std::wostream &out, const ChannelId &channelId)
Definition: ChannelId.h:223
const Tracer & operator<<(ios_type &(*_Pfn)(ios_type &)) const
Output operator for io manipulators.
Definition: Tracer.h:132
stream_type & stream() const
Get the underlying ostream of the logger.
Definition: Tracer.h:167