Syslog message logging
to the console terminal is enabled by default. To disable logging to the
console terminal, use the
logging
console
disable command in
global configuration mode. To reenable logging to the console
terminal, use the
logging
console command in
global configuration mode.
Syslog messages can be
sent to destinations other than the console, such as the logging buffer, syslog
servers, and terminal lines other than the console (such as vtys).
This table lists
the commands used to specify syslog destinations.
Table 2. Commands Used to
Set Syslog Destinations
Command
|
Description
|
logging
buffered
|
Specifies the
logging buffer as a destination for syslog messages.
|
logging {hostname |
ip-address}
|
Specifies a
syslog server host as a destination for syslog messages. IPv4 and IPv6 are
supported.
|
logging
monitor
|
Specifies
terminal lines other than the console as destinations for syslog messages.
|
The
logging
buffered command copies logging messages to the logging buffer.
The buffer is circular, so newer messages overwrite older messages after the
buffer is full. To display the syslog messages that are logged in the logging
buffer, use the
show logging
command. The first message displayed is the oldest message in the buffer. To
clear the current contents of the logging buffer, use the
clear logging
command. To disable logging to the logging buffer, use the
no
logging
buffered command in
global configuration mode.
The
logging command
identifies a syslog server host to receive logging messages. By issuing this
command more than once, you build a list of syslog servers that receive logging
messages. To delete the syslog server with the specified IP address (IPv4 and
IPv6 are supported) or hostname from the list of available syslog servers, use
the
no
logging command in
global
configuration mode.
The
logging
monitor command globally enables the logging of
syslog messages to terminal lines other than the console, such as vtys. To
disable logging to terminal lines other than the console, use the
no
logging
monitor command in
global
configuration mode.