The Severity property of the LogMessage2 object is a Read-Only enumerated constant from the pisdkSeverityLevel enumeration that represents the criticality of the message. A PI Server, version 3.4.380 and greater will automatically associate a predefined severity to messages based on templates. An application can override this setting when posting a message and can also send a severity for messages that don't use a message template.
The allowed values are shown below.
The object placeholder is an object expression that evaluates to a LogMessage2 object.
The possible values of Severity from the pisdkSeverityLevel enumeration that are returned in a LogMessage2 are:
|Enumeration constant||Numeric Value||Description|
|mscCritical||1||The message is of a critical nature and requires attention|
|mscError||2||The message represents an error condition that should be understood and possibly corrected.|
|mscWarning||3||The message is merely a warning that something out of the ordinary has occurred.|
|mscInformation||4||The message is purely for informational purposes.|
|mscDebug||5||The message is for troubleshooting purposes only.|
Severity is an important enhancement to message content, available with the PI Server version 3.4.380 and higher. When retrieving messages using MessageLog2.List2, severity is one of the required parameters. When retrieving messages based on severity, the system returns all messages where the value of the severity constant is equal to or less than that specified. For example when retrieving messages and specifying mscError, all messages in the specified time range with mscError or mscCritical severity are retrieved, providing they meet the other specified filter criteria in the call.