LoggingLevel Enum

Specifies the logging level for the System.debug method.

The following are the values of the System.LoggingLevel enum, listed from the lowest to the highest levels. The level is cumulative, that is, if you select FINE, the log also includes all events logged at the DEBUG, INFO, WARN, and ERROR levels.

ValueDescription
NONENo logging.
ERRORError and exception logging.
WARNWarning logging.
INFOInformational logging.
DEBUGUser-specified debug logging.
FINEHigh level of logging.
FINERHigher level of logging than FINE.
FINESTHighest level of logging.

Log levels are cumulative. For example, if the lowest level, ERROR, is specified for Apex code, only System.debug methods with the log level of ERROR are logged. If the next log level, WARN, is specified, System.debug methods specified with either ERROR or WARN levels are logged.

In this example, if the log level is set to ERROR, the string MsgTxt isn’t written to the debug log because the debug method has a level of INFO.

For more information on log levels, see Debug Log Levels in Salesforce Help.