Configuring Log Severity for Individual and Systemwide Logs
You can change the severity setting for individual logs and the systemwide value.
When working with log severities, keep the following in mind:
- All log event categories have a default. However, the default values can vary for each category. For example, most event categories have a default severity of Error. However, some event categories may have a default severity of Notice, Warning, Info, and so on.
- Log event categories have two statesunassigned (default) and assigned. How a log event category reacts to the log severity command depends on its current state.
- You can change log severities for event categories at a systemwide level or an individual level. Systemwide changes are those that modify a large number of unassigned event categories at one time; for example, the command log severity debug off. Individual changes are those that indicate an explicit event category that you want to change; for example, the command log severity notice clicommand.
- Changes to log event categories at an individual level take precedence over those made at the systemwide level.
- Changes to log event categories at the systemwide level take precedence over the default.
- Assigning a log severity to an individual event category changes its state to Assigned. This means that you cannot change the severity of that event category using systemwide level commands until you return the event category to its default, unassigned state by using the no log severity eventCategory command.
- To return all logs, systemwide and individual, to their default, unassigned severity level, use the no log severity * command.
- To see whether individual or systemwide severity and verbosity settings are in effect, use the show log configuration command.
Example
The following example demonstrates the effects of event category state in regard to using systemwide commands:
- In Configuration mode and having made no changes to the severity settings of any event categories, view the log configuration:
host1(config)#run show log configlog destination console severity WARNINGlog destination nv-file severity CRITICALlog destination syslog 10.10.4.240 facility 7 severity DEBUGno log engineeringlog fields timestamp instance no-calling-taskno log hereWarning: Logging to this terminal is disabledno log severitycategory severity verbosity filters notes-------------------- -------- --------- ------- -----aaaAtm1483Cfg ERROR lowaaaEngineGeneral ERROR lowaaaServerGeneral ERROR lowaaaUserAccess ERROR lowaddressServerGeneral ERROR lowar1AaaServerGeneral ERROR lowatm ERROR lowatm1483 ERROR lowatmAal5 ERROR lowNotice that the atm event category has a default severity of Error.
- Change all event categories to Warning, systemwide, and view the log configuration:
host1(config)#log severity warninghost1(config)#run show log configlog destination console severity WARNINGlog destination nv-file severity CRITICALlog destination syslog 10.10.4.240 facility 7 severity DEBUGno log engineeringlog fields timestamp instance no-calling-taskno log hereWarning: Logging to this terminal is disabledlog severity WARNINGcategory severity verbosity filters notes-------------------- -------- --------- ------- -----aaaAtm1483Cfg WARNING low 1aaaEngineGeneral WARNING low 1aaaServerGeneral WARNING low 1aaaUserAccess WARNING low 1addressServerGeneral WARNING low 1ar1AaaServerGeneral WARNING low 1atm WARNING low 1atm1483 WARNING low 1atmAal5 WARNING low 1- Change the atm category to have a log severity of Emergency and view the log configuration:
host1(config)#log severity emergency atmhost1(config)#run show log configlog destination console severity WARNINGlog destination nv-file severity CRITICALlog destination syslog 10.10.4.240 facility 7 severity DEBUGno log engineeringlog fields timestamp instance no-calling-taskno log hereWarning: Logging to this terminal is disabledlog severity WARNINGcategory severity verbosity filters notes-------------------- -------- --------- ------- -----aaaAtm1483Cfg WARNING low 1aaaEngineGeneral WARNING low 1aaaServerGeneral WARNING low 1aaaUserAccess WARNING low 1addressServerGeneral WARNING low 1ar1AaaServerGeneral WARNING low 1atm EMERGENCY low 2atm1483 WARNING low 1atmAal5 WARNING low 1- Change all event categories to Alert, systemwide, and view the log configuration:
host1(config)#log severity alerthost1(config)#run show log configlog destination console severity WARNINGlog destination nv-file severity CRITICALlog destination syslog 10.10.4.240 facility 7 severity DEBUGno log engineeringlog fields timestamp instance no-calling-taskno log hereWarning: Logging to this terminal is disabledlog severity ALERTcategory severity verbosity filters notes-------------------- -------- --------- ------- -----aaaAtm1483Cfg ALERT low 1aaaEngineGeneral ALERT low 1aaaServerGeneral ALERT low 1aaaUserAccess ALERT low 1addressServerGeneral ALERT low 1ar1AaaServerGeneral ALERT low 1atm EMERGENCY low 2atm1483 ALERT low 1atmAal5 ALERT low 1Notice that the atm event category that you individually assigned in Step 3 does not change.
- Turn off log notification, systemwide, and view the log configuration:
host1(config)#log severity offhost1(config)#run show log configlog destination console severity WARNINGlog destination nv-file severity CRITICALlog destination syslog 10.10.4.240 facility 7 severity DEBUGno log engineeringlog fields timestamp instance no-calling-taskno log hereWarning: Logging to this terminal is disabledlog severity OFFcategory severity verbosity filters notes-------------------- --------- --------- ------- -----aaaAtm1483Cfg OFF low 1aaaEngineGeneral OFF low 1aaaServerGeneral OFF low 1aaaUserAccess OFF low 1addressServerGeneral OFF low 1ar1AaaServerGeneral OFF low 1atm EMERGENCY low 2atm1483 OFF low 1atmAal5 OFF low 1Notice that the atm event category does not change.
- Remove the assigned status of the atm event category and view the log configuration:
host1(config)#no log severity atmhost1(config)#run show log configlog destination console severity WARNINGlog destination nv-file severity CRITICALlog destination syslog 10.10.4.240 facility 7 severity DEBUGno log engineeringlog fields timestamp instance no-calling-taskno log hereWarning: Logging to this terminal is disabledlog severity OFFcategory severity verbosity filters notes-------------------- -------- --------- ------- -----aaaAtm1483Cfg OFF low 1aaaEngineGeneral OFF low 1aaaServerGeneral OFF low 1aaaUserAccess OFF low 1addressServerGeneral OFF low 1ar1AaaServerGeneral OFF low 1atm OFF low 1atm1483 OFF low 1atmAal5 OFF low 1Notice that the atm event category follows the systemwide severity level of OFF. The systemwide setting takes precedence over the atm event category default of Error.
- Change all event categories, systemwide, to their default/unassigned levels, and view the log configuration:
host1(config)#no log severity *Please wait....host1(config)#run show log configlog destination console severity WARNINGlog destination nv-file severity CRITICALlog destination syslog 10.10.4.240 facility 7 severity DEBUGno log engineeringlog fields timestamp instance no-calling-taskno log hereWarning: Logging to this terminal is disabledno log severitycategory severity verbosity filters notes-------------------- -------- --------- ------- -----aaaAtm1483Cfg ERROR lowaaaEngineGeneral ERROR lowaaaServerGeneral ERROR lowaaaUserAccess ERROR lowaddressServerGeneral ERROR lowar1AaaServerGeneral ERROR lowatm ERROR lowatm1483 ERROR lowatmAal5 ERROR low