ILogMessageConsumer2#
Fully qualified name: omni::log::ILogMessageConsumer2
Defined in omni/log/ILogMessageConsumer2.h
-
class ILogMessageConsumer2 : public omni::core::Generated<omni::log::ILogMessageConsumer2_abi>#
Consumes (listens for) log messages.
omni::log::ILogMessageConsumer2 is usually associated with an omni::log::ILog instance. Add a consumer to an omni::log::ILog object with omni::log::ILog::addMessageConsumer().
Public Functions
-
inline void onMessage(const carb::logging::LogMessage &msg) noexcept#
Receives a log message.
Logging a message from this method results in undefined behavior.
Accessing the owning omni::log::ILog from this method will lead to undefined behavior.
The memory pointed to by the provided pointers will remain valid only during the duration of this call.
- Thread Safety
This method must be thread safe as the attached omni::log::ILog may send messages to this object in parallel.
Note
As ILogMessageConsumer2 inherits from ILogMessageConsumer, both onMessage functions must be implemented, but the logging subsystem will only call this onMessage signature for ILogMessageConsumer2.
Protected Functions
- virtual void onMessage_abi(
- const carb::logging::LogMessage &msg,
Receives a log message.
Logging a message from this method results in undefined behavior.
Accessing the owning omni::log::ILog from this method will lead to undefined behavior.
The memory pointed to by the provided pointers will remain valid only during the duration of this call.
- Thread Safety
This method must be thread safe as the attached omni::log::ILog may send messages to this object in parallel.
Note
As ILogMessageConsumer2 inherits from ILogMessageConsumer, both onMessage functions must be implemented, but the logging subsystem will only call this onMessage signature for ILogMessageConsumer2.
- void onMessage_abi(
- const char *channel,
- Level level,
- const char *moduleName,
- const char *fileName,
- const char *functionName,
- uint32_t lineNumber,
- const char *msg,
- carb::thread::ProcessId pid,
- carb::thread::ThreadId tid,
- uint64_t timestamp,
Receives a log message.
Logging a message from this method results in undefined behavior.
Accessing the owning omni::log::ILog from this method will lead to undefined behavior.
The memory pointed to by the provided pointers will remain valid only during the duration of this call.
- Thread Safety
This method must be thread safe as the attached omni::log::ILog may send messages to this object in parallel.
-
inline void onMessage(const carb::logging::LogMessage &msg) noexcept#