Configuration manual
9. System Log Management
97
www.qtech.ru
memory is enabled.
Configure the alarm of
the insufficient log file
capacity
logging { file | buffer }
warning [ warning-value ]
Optional
By
default,
the
log
information
alarm
function is not enabled.
Configure the log file
compression
logging compress [ gunzip
]
logging compress { file-
size | max-num } value
Optional
By default, do not enable
the
log
compression
function.
9.2.2
Configure the Timestamp for Logs
Configuration Condition
None
Configure the Timestamp for Logs
The timestamp of a log records in details the time at which the log is generated. By default, log
timestamps adopt the Datetime (absolute time) format, but they also support Uptime (relative
time) format. The absolute time format records the year and the time with millisecond
precision. It outputs the time of logs in details, therefore, the absolute time format is
recommended.
Table 9–8 Configuring the timestamp for logs
Step
Command
Description
Enter
the
global
configuration mode.
configure terminal
-
Configure the timestamp
for logs.
service
timestamps
{ log | debug } [ uptime |
datetime [ localtime /
msec / show-timezone /
year ] ]
Optional.
By
default,
the
log
information adopts the
absolute time format, but
no year and millisecond
precision display.
The uptime refers to the run time starting with device startup.
The datetime refers to the time of the real-time clock.
The localtime refers to local time.