logging

To enable the system to forward logs to a remote system or to configure the log level, use the logging command in Configuration mode. To disable this function, use the no form of this command.

logging {ip-address | hostname} {loglevel level}

Syntax Description

logging

The command to configure system logging.

ip-address

IP address of remote system to which you forward logs. Supports up to 32 alphanumeric characters.

hostname

Hostname of remote system to which you forward logs. Supports up to 32 alphanumeric characters.

loglevel

The command to configure the log level for the logging command.

level

Number of the desired priority level at which you set the log messages. Priority levels are (enter the number for the keyword):

 • 0-emerg—Emergencies: System unusable.

 • 1-alert—Alerts: Immediate action needed.

 • 2-crit—Critical: Critical conditions.

 • 3-err—Error: Error conditions.

 • 4-warn—Warning: Warning conditions.

 • 5-notif—Notifications: Normal but significant conditions.

 • 6-inform—(Default) Informational messages.

 • 7-debug—Debugging messages.

Defaults

No default behavior or values.

Command Modes

Configuration

Usage Guidelines

This command requires an IP address or hostname or the loglevel keyword; an error occurs if you enter two or more of these arguments.

Examples

Example 1

/admin(config)# logging 209.165.200.225

/admin(config)#

Example 2

/admin(config)# logging loglevel 0

/admin(config)#

 

Related Commands

Command

Description

show logging

Displays list of logs for the system.