Saving logs to the log file – H3C Technologies H3C S6300 Series Switches User Manual

Page 93

Advertising
background image

80

Step Command

Remarks

4.

(Optional.) Set the maximum
number of logs that can be

stored in the log buffer.

info-center logbuffer size
buffersize

By default, the log buffer can store
512 logs.

5.

Configure an output rule for
the log buffer.

info-center source { module-name |
default } { console | monitor |
logbuffer | logfile | loghost }

{ deny | level severity }

For information about default
output rules, see "

Default output

rules for logs

."

6.

(Optional.) Configure the

timestamp format.

info-center timestamp { boot | date
| none }

By default, the timestamp format is
date.

Saving logs to the log file

By default, the log file feature saves logs from the log file buffer to the log file every 24 hours. You can
adjust the saving interval or manually save logs to the log file. After saving logs into the log file, the

system clears the log file buffer.
The log file has a maximum capacity. When the maximum capacity is reached, the system will replace

earliest logs with new logs.
To save logs to the log file:

Step Command

Remarks

1.

Enter system view.

system-view

N/A

2.

Enable the information center. info-center enable

By default, the information center is
enabled.

3.

Enable the log file feature.

info-center logfile enable

By default, the log file feature is
enabled.

4.

(Optional.) Enable log file

overwrite-protection.

info-center logfile

overwrite-protection
[ all-port-powerdown ]

By default, log file
overwrite-protection is disabled.
This command is supported only in
FIPS mode.

5.

(Optional.) Configure the

maximum size for the log file. info-center logfile size-quota size

By default, the maximum size of the
log file is 10 MB.
To ensure normal operation, set the
size argument to a value between

1 MB and 10 MB.

6.

(Optional.) Specify the
directory to save the log file.

info-center logfile directory
dir-name

The default directory is
flash:/logfile.
The configuration made by this
command cannot survive an IRF

reboot or a master/subordinate

switchover.

Advertising