289
Outputting logs to log hosts
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.
Configure an output rule
for the log host.
info-center source
{
module-name
|
default
}
{
console
|
monitor
|
logbuffer
|
logfile
|
loghost
} {
deny
|
level
severity
}
For information about default output
rules, see "
4.
(Optional.) Specify the
source IP address for
output logs.
info-center loghost source
interface-type interface-number
By default, the source IP address of
output logs is the primary IP address
of their outgoing interfaces.
5.
(Optional.) Specify the
format for logs to be
output to log hosts.
info-center format
{
unicom
|
cmcc
}
By default, logs are output to log hosts
in standard format.
6.
(Optional.) Configure
the timestamp format.
info-center
timestamp
loghost
{
date
|
iso
[
with-timezone
] |
no-year-date
|
none
}
The default timestamp format is
date
.
7.
Specify a log host and
configure related
parameters.
info-center loghost
[
vpn-instance
vpn-instance-name
] {
hostname
|
ipv4-address
|
ipv6
ipv6-address
}
[
port
port-number
] [
facility
local-number
]
By default, no log hosts or related
parameters are specified.
The value for the
port-number
argument must be the same as the
value configured on the log host.
Otherwise, the log host cannot
receive logs.
The device supports a maximum of 20
log hosts.
Outputting logs to the log buffer
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 log output to the log
buffer.
info-center logbuffer
By default, log output to the log
buffer is enabled.
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 "
6.
(Optional.) Configure the
timestamp format.
info-center timestamp
{
boot
|
date
|
none
}
The default timestamp format is
date
.