OMNI_LOG_DECLARE_CHANNEL

Defined in omni/log/LogChannel.h

OMNI_LOG_DECLARE_CHANNEL(varName_)

Given a channel name (as a string), declares a global variable to identify the channel.

This macro must be called at global scope.

This macro can be called multiple times in a module (think of it as a forward declaration).

OMNI_LOG_ADD_CHANNEL() must be called, only once, to define the properties of the channel (e.g. name, description, etc.).

For example, the following declares a channel identified by the kImageChannel variable:

OMNI_LOG_DECLARE_CHANNEL(kImageLoadChannel);

Later, we can log to that channel:

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

Above, kImageChannel is just a variable describing the channel. To define the channel name (what the user sees) use OMNI_LOG_ADD_CHANNEL().