ITLogLevel enum and its connection to the loglevel of a logmessage

This enumeration type is used to define the level (or importance) of a logmessage, which we call the Loglevel. The Loglevel is displayed in the ITLogBook application and can be used there to filter logmessages.

 

In fact, the Loglevel of a logmessage is a combination of independent bits, and the enumeration type ITLogLevel doesn’t represent the Loglevel type, but defines the symbolical constants for these bits.

Here is the definition of the ITLogLevel type (in VB syntax):

 

Enum ITLogLevel2

LEVEL_INFO = 1

LEVEL_WARNING = 2

LEVEL_ERROR = 4

LEVEL_ALARM = 8

End Enum

 

The actual Loglevel value of a logmessage -- in which more than one bit can be set -- is currently represented using type Integer in the ITLogLib API (see for instance, property ITLogMsg.LogLevel).

 

You can modify the Loglevel of a logmessage using the property ITLogMsg.LogLevel or the method ITLogMsg.AddLogLevel. Both formally accept only an ITLogLevel enumeration value (a single bit). If you want to set a combination of bits you can:

§      use a combination of ITLogLevel values, by using bitwise Or
Example: LEVEL_INFO Or LEVEL_WARNING

or

§      do several calls to AddLogLevel -- each for one bit you want to set