OMNI_LOG_WARN
Defined in omni/log/ILog.h
-
OMNI_LOG_WARN(channelOrFormat_, ...)
Logs a message at omni::log::Level::eWarn 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_WARN(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_WARN("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_ERROR, OMNI_LOG_FATAL.
- Thread Safety
This macro is thread safe though may block if
omniGetLogWithAcquire()->isAsync()
isfalse
.