69 : disabled(false), msg(
LogMessage(level, filePath, lineNumber, functionName)), ss(
std::stringstream::out)
91 std::locale originalLocale = ss.getloc();
96 ss.imbue(originalLocale);
108 std::locale originalLocale = ss.getloc();
113 ss.imbue(originalLocale);
124 std::locale originalLocale = ss.getloc();
129 ss.imbue(originalLocale);
150 disabled |= !enabled;
208 #define MBI_INFO mbilog::PseudoStream(mbilog::Info, __FILE__, __LINE__, __FUNCTION__) 209 #define MBI_WARN mbilog::PseudoStream(mbilog::Warn, __FILE__, __LINE__, __FUNCTION__) 210 #define MBI_ERROR mbilog::PseudoStream(mbilog::Error, __FILE__, __LINE__, __FUNCTION__) 211 #define MBI_FATAL mbilog::PseudoStream(mbilog::Fatal, __FILE__, __LINE__, __FUNCTION__) 215 #ifdef MBILOG_ENABLE_DEBUG 216 #define MBI_DEBUG mbilog::PseudoStream(mbilog::Debug, __FILE__, __LINE__, __FUNCTION__) 218 #define MBI_DEBUG true ? mbilog::NullStream() : mbilog::NullStream() // this is magic by markus NullStream & operator<<(std::ostream &(*)(std::ostream &))
NullStream & operator<<(const T &)
void MBILOG_EXPORT UnregisterBackend(BackendBase *backend)
Unregisters a backend.
NullStream & operator()(const char *)
const char * moduleName
Name of the module where the logging message was emitted which is generated by the macros in file mbi...
void MBILOG_EXPORT EnableBackends(OutputType type)
PseudoStream & operator<<(const T &data)
Definition of the bit shift operator for this class.
An object of this class simulates a std::cout stream. This means messages can be added by using the b...
PseudoStream & operator()(const char *category)
Sets the category of this PseudoStream object. If there already is a category it is appended...
NullStream & operator()(bool)
void MBILOG_EXPORT DisableBackends(OutputType type)
PseudoStream & operator()(bool enabled)
Enables/disables the PseudoStream. If set to false parsing and output is suppressed.
std::string message
The actual logging message.
void MBILOG_EXPORT DistributeToBackends(LogMessage &l)
Distributes the given message to all registered backends. Should only be called by objects of the cla...
An object of this class represents a single logging message (logging event) of the mbi logging mechan...
bool MBILOG_EXPORT IsBackendEnabled(OutputType type)
PseudoStream & operator<<(T &data)
Definition of the bit shift operator for this class (for non const data).
PseudoStream(int level, const char *filePath, int lineNumber, const char *functionName)
NullStream & operator<<(T &)
void MBILOG_EXPORT RegisterBackend(BackendBase *backend)
Registeres a backend to the mbi logging mechanism. If a backend is registered here, all mbilog messages are relayed to this backend through the method ProcessMessage. If no backend is registered the default backend is used.
#define MBILOG_MODULENAME
PseudoStream & operator<<(std::ostream &(*func)(std::ostream &))
Definition of the bit shift operator for this class (for functions).
std::string category
Category of the logging event, which was defined by the user.
~PseudoStream()
The message which is stored in the member ss is written to the backend.
An object of this class simulates a std::cout stream but does nothing. This class is for dummy object...