logging

Profile Config Commands

Enables message logging and configures logging settings. When enabled, the profile logs individual system events to a user-defined log file or a syslog server. Message logging is disabled by default.

Enabling message logging is recommended, because system event logs can be analyzed to determine an overall pattern that may be negatively impacting performance.

This command can also be executed in the device configuration mode.

Supported on the following devices:

Syntax

logging [aggregation-time|buffered|console|facility|forward|host|on|syslog]
logging [aggregation-time <1-60>|host [<IPv4>|<IPv6>] {port <1-65535>}|on]
logging [buffered|console|syslog|forward] [<0-7>|emergencies|alerts|critical| errors|warnings|notifications|informational|debugging]
logging facility [local0|local1|local2|local3|local4|local5|local6|local7]

Parameters

logging [aggregation-time <1-60>|host [<IPv4>|<IPv6>] {port <1-65535>}|on]
logging Enables message logging and configures logging settings
aggregation-time <1-60> Sets the number of seconds for aggregating repeated messages. This is the interval at which system events are logged on behalf of this profile. The shorter the interval, the sooner the event is logged.
  • <1-60> – Specify a value from 1 - 60 seconds. The default value is 0.
host [<IPv4>|<IPv6>] {port <1-65535>} Configures a remote host to receive log messages. Defines numerical (non DNS) IPv4 or IPv6 addresses for external resources where logged system events can be sent on behalf of the profile (or device). A maximum of four entries can be made.
  • <IPv4> – Specify the IPv4 address of the remote host.
  • <IPv6> – Specify the IPv6 address of the remote host.
    • port <1-65535> – Optional. Configures the syslog port
      • <1-65535> – Specify the syslog port from 1 - 65535. The default port is 514.
on Enables the logging of system messages
logging [buffered|console|syslog|forward] [<0-7>|emergencies|alerts|critical|
errors|warnings|notifications|informational|debugging]
logging Enables message logging and configures logging settings
buffered Sets the buffered logging level
console Sets the console logging level
syslog Sets the syslog server‘s logging level
forward Forwards system debug messages to the wireless controller or service platform
[<0-7>|alerts| criticail|debugging| emergencies|errors| informational| notifications| warnings] The following keywords are common to the buffered, console, syslog, and forward parameters.

All incoming messages have different severity levels based on their importance. The severity level is fixed on a scale of 0 - 7.

  • <0-7> – Sets the message logging severity level on a scale of 0 - 7
  • emergencies – Severity level 0: System is unusable
  • alerts – Severity level 1: Requires immediate action
  • critical – Severity level 2: Critical conditions
  • errors – Severity level 3: Error conditions
  • warnings – Severity level 4: Warning conditions (default)
  • notifications – Severity level 5: Normal but significant conditions
  • informational – Severity level 6: Informational messages
  • debugging – Severity level 7: Debugging messages
logging facility [local0|local1|local2|local3|local4|local5|local6|local7]
logging Enables message logging and configures logging settings
facility [local0|local1| local2|local3|local4| local5|local6|local7] Enables the syslog to decide where to send the incoming message

There are 8 logging facilities, from syslog0 to syslog7.

  • local0 – Syslog facility local0
  • local1 – Syslog facility local1
  • local2 – Syslog facility local2
  • local3 – Syslog facility local3
  • local4 – Syslog facility local4
  • local5 – Syslog facility local5
  • local6 – Syslog facility local6
  • local7 – Syslog facility local7

Example

NOC-NX9500(config-profile-testNX9000)#logging facility local4

NOC-NX9500(config-profile-testNX9000)#show context include-factory | include log
ging
 no logging on
 logging aggregation-time 0
 logging console warnings
 logging buffered warnings
 logging syslog warnings
 logging facility local4
 logging forward errors
 no l2tpv3 logging
 no dpi logging on
 dpi logging level notifications
NOC-NX9500(config-profile-testNX9000)#

Related Commands

no Disables logging on this profile