记一笔,关于 syslogd

• 本文约 136 字,阅读大致需要 1 分钟 | Development | #syslogd | #Logging | #UTF-8 | #SysAdmin

syslogd的 -8参数可以让汉字通过。以下摘自manual page:

1
2
3
4
5
6
     -8      Tells syslogd not to interfere with 8-bit data.  Normally syslogd
             will replace C1 control characters (ISO 8859 and Unicode
             characters) with their "M-x" equivalent.  Note, this option does
             not change the way syslogd alters control characters (see
             iscntrl(3)).  They will always be replaced with their "^x" equiv‐
             alent.

不过这事有点坑人,为啥默认不 -8呢?出于安全方面的原因吗?差点就开始改代码了……