Skip to content

Logging

Logging configuration controls the system message logging behavior on NX-OS devices, enabling centralized collection and severity-based filtering of operational and diagnostic messages. It supports global log level settings ranging from emergencies to debugging, with per-facility granular severity overrides for specific subsystems such as AAA, spanning tree, LACP, NTP, RADIUS, and security. Logging is critical for network operations including troubleshooting, security event analysis, compliance auditing, and proactive monitoring of device health and protocol state changes.

Diagram
NameTypeConstraintMandatoryDefault Value
loggingClass[logging]No

NameTypeConstraintMandatoryDefault Value
levelChoiceemergencies, alerts, critical, errors, warnings, notifications, information, debuggingNo
facilitiesList[facilities]No

facilities (nxos.devices.configuration.logging)

Section titled “facilities (nxos.devices.configuration.logging)”
NameTypeConstraintMandatoryDefault Value
nameChoicespanning-tree, session-mgr, radius, security, plugin, cdp, bootvar, aaa, interface-vlan, vshd, cfs, monitor, ntp, acllog, track, pltfm-config, lacpYes
levelChoiceemergencies, alerts, critical, errors, warnings, notifications, information, debuggingNo

Example 1: Basic logging with global severity level

nxos:
devices:
- name: LEAF1
configuration:
logging:
level: warnings

Example 2: Granular logging with per-facility severity overrides

nxos:
devices:
- name: LEAF1
configuration:
logging:
level: notifications
facilities:
- name: aaa
level: information
- name: spanning-tree
level: warnings
- name: lacp
level: information
- name: ntp
level: warnings

Example 3: Comprehensive logging configuration for production fabric switch

nxos:
devices:
- name: BORDER-LEAF1
configuration:
logging:
level: notifications
facilities:
- name: aaa
level: information
- name: security
level: information
- name: radius
level: warnings
- name: spanning-tree
level: notifications
- name: lacp
level: information
- name: ntp
level: warnings
- name: interface-vlan
level: information
- name: monitor
level: warnings