< Home

firewall log charset utf-8

Function

The firewall log charset utf-8 command switches the encoding format to UTF-8 for sent syslogs.

The undo firewall log charset utf-8 command restores the encoding format to GBK for sent syslogs.

Format

firewall log charset utf-8

undo firewall log charset utf-8

Parameters

None

Views

System view

Default Level

2: Configuration level

Usage Guidelines

The default encoding format is GBK for sent syslogs.

You can use this command to switch the character encoding of outgoing Syslog logs to UTF-8 for the syslog session logs sent by the firewall log host command and the syslog system logs and business logs sent by the info-center loghostcommand.

If the log host uses the UTF-8 encoding format, run the firewall log charset utf-8 command to switch the encoding format of sent syslogs to UTF-8, so that the log host can parse the logs sent by the FW.

In non-Chinese environments, if the system character encoding format has been switched to UTF-8 (language character-set utf-8), the encoding format for sent syslogs is automatically switched to UTF-8. That is, you do not need to run the firewall log charset utf-8 command to manually switch the encoding format.

UTF-8 is a variable-length encoding format. Each character contains 1 to 6 bytes. After the encoding format is switched to UTF-8, the length of a log may extend, and the excess part will be cut.

Example

# Switch the encoding format to UTF-8 for sent logs.

<sysname> system-view
[sysname] firewall log charset utf-8
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >