ILogMessageConsumer2_abi#

Fully qualified name: omni::log::ILogMessageConsumer2_abi

Defined in omni/log/ILogMessageConsumer2.h

class ILogMessageConsumer2_abi : public omni::core::Inherits<ILogMessageConsumer_abi, std::integral_constant<uint64_t, carb::fnv1aHash("omni.log.ILogMessageConsumer2")>::value>#

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().

Subclassed by omni::core::Generated< omni::log::ILogMessageConsumer2_abi >

Protected Functions

virtual void onMessage_abi(
const carb::logging::LogMessage &msg,
) noexcept = 0#

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,
) noexcept = 0#

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.