Configuring Logging
Configure logging to determine the types of messages to log and where to store the messages.
About this task
Note
The platform logs CLILOG and SNMPLOG as INFO. Normally, if you configure the logging level to WARNING, the system skips all INFO messages. However, if you enable CLILOG and SNMPLOG the system logs CLI Log and SNMP Log information regardless of the logging level you configure. This is not the case for other INFO messages.
Procedure
Example
Switch:1(config)#logging level 0 Switch:1(config)#logging write log2 Switch:1(config)#logging screen
Variable Definitions
The following table defines parameters for the logging command.
Variable |
Value |
---|---|
level <0-4> |
Shows and configures the logging level. The level is one of the
following values:
|
screen |
Configures the log display on the screen to on. Use the no form of the command to stop the log display on the screen: no logging screen |
transferFile <1–10> address {A.B.C.D} filename-prefix WORD<0–200 |
Transfers the syslog file to a remote FTP or TFTP server. <1–10> specifies the file ID. The address {A.B.C.D} option specifies the IP address. The filename-prefix WORD<0–200> option sets the filename prefix for the log file at the remote host. |
write WORD<1-1536> |
Writes the log file with the designated string. WORD<1-1536> is the string or command that you append to the log file. If the string contains spaces, you must enclose the string in quotation marks ("). |