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
Section titled “Diagram”Classes
Section titled “Classes”configuration (nxos.devices)
Section titled “configuration (nxos.devices)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| logging | Class | [logging] | No |
logging (nxos.devices.configuration)
Section titled “logging (nxos.devices.configuration)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| level | Choice | emergencies, alerts, critical, errors, warnings, notifications, information, debugging | No | |
| facilities | List | [facilities] | No |
facilities (nxos.devices.configuration.logging)
Section titled “facilities (nxos.devices.configuration.logging)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| name | Choice | spanning-tree, session-mgr, radius, security, plugin, cdp, bootvar, aaa, interface-vlan, vshd, cfs, monitor, ntp, acllog, track, pltfm-config, lacp | Yes | |
| level | Choice | emergencies, alerts, critical, errors, warnings, notifications, information, debugging | No |
Examples
Section titled “Examples”Example 1: Basic logging with global severity level
nxos: devices: - name: LEAF1 configuration: logging: level: warningsExample 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: warningsExample 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