Defined in omni/log/ILog.h

OMNI_LOG_INFO(channelOrFormat_, ...)

Logs a message at omni::log::Level::eInfo 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_INFO(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_INFO("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


Thread Safety

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