22 static std::list<mbilog::BackendBase *>
backends;
32 backends.push_back(backend);
37 backends.remove(backend);
44 std::string::size_type i = l.
message.find_last_not_of(
" \t\f\v\n\r");
45 l.
message = (i != std::string::npos) ? l.
message.substr(0, i + 1) :
"";
51 if (backends.empty() && (dummyBackend ==
nullptr))
57 else if ((backends.size() > 1) && (dummyBackend !=
nullptr))
62 dummyBackend =
nullptr;
66 std::list<mbilog::BackendBase *>::iterator i;
67 for (i = backends.begin(); i != backends.end(); i++)
76 disabledBackendTypes.erase(type);
81 disabledBackendTypes.insert(type);
86 return disabledBackendTypes.find(type) == disabledBackendTypes.end();
static std::set< mbilog::OutputType > disabledBackendTypes
static const std::string NA_STRING
void MBILOG_EXPORT UnregisterBackend(BackendBase *backend)
Unregisters a backend.
void MBILOG_EXPORT EnableBackends(OutputType type)
void MBILOG_EXPORT DisableBackends(OutputType type)
Default backend of the mbi logging mechanism. This backend is used if no other backend is registered...
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)
void SetFull(bool full)
Sets the formatting mode. If true long messages will be displayed. Default is false (short/smart mess...
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.
static std::list< mbilog::BackendBase * > backends
virtual void ProcessMessage(const mbilog::LogMessage &l) override
This method is called by the mbi logging mechanism if the object is registered in the mbi logging mec...
This class is an interface for logging backends that can be registered in the mbi logging mechanism...