OMNI_LOG_FATAL

Defined in omni/log/ILog.h

OMNI_LOG_FATAL(channelOrFormat_, ...)

Logs a message at omni::log::Level::eFatal level.

The first argument can be either a channel or the format string.

If the first argument is a channel, the second argument is the format string. Channels can be created with the OMNI_LOG_ADD_CHANNEL macro.

For example:

OMNI_LOG_ADD_CHANNEL(kImageLoadChannel, "omni.image.load", "Messages when loading an image.");

...

OMNI_LOG_FATAL(kImageLoadChannel, "I loaded a cool image: %s", imageFilename);

If the first argument is the format string, the channel defined by the OMNI_LOG_DEFAULT_CHANNEL is used. Example usage:

OMNI_LOG_FATAL("This message is going to the default channel: %s", "woo-hoo");

The given format string uses the same tokens as the printf family of functions.

The omni::log::ILog used to log the message is the log returned by omniGetLogWithoutAcquire().

See also

OMNI_LOG_VERBOSE, OMNI_LOG_INFO, OMNI_LOG_WARN, OMNI_LOG_ERROR.

Thread Safety

This macro is thread safe though may block if omniGetLogWithAcquire()->isAsync() is false.

Note

This macro does not terminate the process, it just logs a message.