Configuring System Logging

System logs are a valuable diagnostic tool. You can send log messages to flash files for later retrieval.

About this task

You can change log file parameters at anytime without restarting the system. Changes made to these parameters take effect immediately.

Configure logging to a flash file at all times as a best practice.

Procedure

  1. Enter Global Configuration mode:

    enable

    configure terminal

  2. Enable system logging to a PC card file:

    boot config flags logging

  3. Configure the logfile parameters:

    boot config logfile <64-500> <500-16384> <10-90>

Example

Switch:1>enable
Switch:1#configure terminal
Switch:1(config)#boot config logfile 64 600 10

Variable Definitions

The following table defines parameters for the boot config command.

Variable

Value

flags logging

Enables or disables logging to a flash file. The log file is named using the format log.xxxxxxxx.sss. The first six characters after the prefix of the file name log contain the last three bytes of the chassis base MAC address. The next two characters specify the slot number. The last three characters denote the sequence number of the log file.

logfile <64-500> <500-16384> <10-90>

Configures the following logfile parameters:
  • <64-500> specifies the minimum free memory space on the external storage device from 64–500 KB. The switch does not support this parameter.

  • <500-16384> specifies the maximum size of the log file from 500–16384 KB.

  • <10-90> specifies the maximum percentage, ranging from 10–90 percent, of space on the external storage device the logfile can use. The switch does not support this parameter.