Timestamp
Timestamp
The part of the message preceding the percent sign depends on the setting of these global configuration
commands:
• service sequence-numbers
• service timestamps log datetime
• service timestamps log datetime [localtime] [msec] [show-timezone]
• service timestamps log uptime
Element Description
seq no: Stamps log messages with a sequence number only if the service sequence-numbers
global configuration command is configured.
timestamp formats: Date and time of the message or event. This information appears only if the service
timestamps log [datetime | log] global configuration command is configured.
mm/dd h h:mm:ss
or
hh:mm:ss (short
uptime)
or
d h (long uptime)
facility The facility to which the message refers (for example, SNMP, SYS, and so forth).
description Text string containing detailed information about the event being reported.
Procedure
Device(config)# end
Procedure
Step 2 line [console | vty] line-number Specifies the line to be configured for
[ending-line-number] synchronous logging of messages.
Example: • console —Specifies configurations that
occur through the switch console port or
Device(config)# line console the Ethernet management port.
• line vty line-number—Specifies which vty
lines are to have synchronous logging
enabled. You use a vty connection for
configurations that occur through a Telnet
session. The range of line numbers is from
0 to 15.
Device(config)# end
Procedure
Device(config)# end
Procedure
Device(config)# end
Procedure
Device(config)# end
Procedure
Step 3 logging monitor level Limits messages logged to the terminal lines.
Example: By default, the terminal receives debugging
messages and numerically lower levels.
Device(config)# logging monitor 3
Step 4 logging trap level Limits messages logged to the syslog servers.
Example: By default, syslog servers receive informational
messages and numerically lower levels.
Device(config)# logging trap 3
Device(config)# end
Procedure
Step 2 logging history level Changes the default level of syslog messages
stored in the history file and sent to the SNMP
Example:
server.
Device(config)# logging history 3 By default, warnings, errors, critical, alerts,
and emergencies messages are sent.
Step 3 logging history size number Specifies the number of syslog messages that
can be stored in the history table.
Example:
Device(config)# end
Note Some recent versions of UNIX syslog daemons no longer accept by default syslog packets from the network.
If this is the case with your system, use the UNIX man syslogd command to decide what options must be
added to or removed from the syslog command line to enable logging of remote syslog messages.
Procedure
Step 2 Enter these commands at the UNIX shell Creates the log file. The syslog daemon sends
prompt. messages at this level or at a more severe level
to this file.
Example:
$ touch /var/log/cisco.log
$ chmod 666 /var/log/cisco.log
show archive log config {all | number Displays the entire configuration log or the log for specified
[end-number] | user username [session parameters.
number] number [end-number] | statistics}
[provisioning]