问题:tomcat启动,server日志无异常,Tomcat Catalina 日志中文乱码,下图为修改后,重启OK.看网友好多改各种配置文件,啥玩意都试了,这小窗口就是乱码。由于是catalina日志乱码,在tomcat bin目录下,找到catalina.sh 文件,找日志配置,改编码格式。发现 日志配置指定了conf 文件下logging.properties 文件。
# Set juli LogManager config file if it is present and an override has not been issued
if [ -z "$LOGGING_CONFIG" ]; then
if [ -r "$CATALINA_BASE"/conf/logging.properties ]; then
LOGGING_CONFIG="-Djava.util.logging.config.file=$CATALINA_BASE/conf/logging.properties"
else
# Bugzilla 45585
LOGGING_CONFIG="-Dnop"
fi
fi
那就到这个文件下,把里面所有 UTF-8 的编码配置都改为 GBK。重启应用。OK 如果还是乱码,那可能你还需要改idea编码配置。 参考:https://www.cnblogs.com/N1ckeyQu/p/11629167.html