I'm running a rsyslog service in a docker container.
Its configuration(rsyslog.conf) looks like below,
module(load="imuxsock") # local system logging support (e.g. via logger command)
module(load="imudp") # UDP listener support module(load="imtcp")
module(load="mmutf8fix")
action(type="mmutf8fix")
LOCAL1.* action(type="omfile" file="/var/log/my.log")
The client program is Java program that is using logback to write the log to both local file and remote rsyslog service.
The local log file looks like for non-ascii characters, whose encoding is UTF-8.
However the output file of rsyslog is NOT UTF-8. Of course the non-ascii characters can not be shown properly.
➜ rsyslog git:(master) ✗ file /volume/disk/logs/svt/my.log
/volume/disk/logs/svt/my.log: ASCII text, with very long lines
I'm wondering how to configure rsyslog to write output as UTF-8, there is no obvious solution after searching Google.