【设置Tomcat生成的日志文件编码格式为UTF-8】设置tomcat生成的日志文件编码utf-8,修改conf/logging.properties,添加编码设置
1catalina.org.apache.juli.AsyncFileHandler.level = FINE
1catalina.org.apache.juli.AsyncFileHandler.directory = ${catalina.base}/logs
1catalina.org.apache.juli.AsyncFileHandler.prefix = catalina.
1catalina.org.apache.juli.AsyncFileHandler.maxDays = 90
1catalina.org.apache.juli.AsyncFileHandler.encoding=UTF-8
2localhost.org.apache.juli.AsyncFileHandler.level = FINE
2localhost.org.apache.juli.AsyncFileHandler.directory = ${catalina.base}/logs
2localhost.org.apache.juli.AsyncFileHandler.prefix = localhost.
2localhost.org.apache.juli.AsyncFileHandler.maxDays = 90
2localhost.org.apache.juli.AsyncFileHandler.encoding=UTF-8
3manager.org.apache.juli.AsyncFileHandler.level = FINE
3manager.org.apache.juli.AsyncFileHandler.directory = ${catalina.base}/logs
3manager.org.apache.juli.AsyncFileHandler.prefix = manager.
3manager.org.apache.juli.AsyncFileHandler.maxDays = 90
3manager.org.apache.juli.AsyncFileHandler.encoding=UTF-8
4host-manager.org.apache.juli.AsyncFileHandler.level = FINE
4host-manager.org.apache.juli.AsyncFileHandler.directory = ${catalina.base}/logs
4host-manager.org.apache.juli.AsyncFileHandler.prefix = host-manager.
4host-manager.org.apache.juli.AsyncFileHandler.maxDays = 90
4host-manager.org.apache.juli.AsyncFileHandler.encoding=UTF-8
java.util.logging.ConsoleHandler.level = FINE
java.util.logging.ConsoleHandler.formatter = org.apache.juli.OneLineFormatter
java.util.logging.ConsoleHandler.encoding=UTF-8
推荐阅读
- jar|springboot项目打成jar包和war包,并部署(快速打包部署)
- tomcat|tomcat配置多个项目的server.xml的配置
- intellij-idea|JavaWeb: IntelliJ IDEA集成开发环境下开发第一个servlet程序(JDBC)Tomcat
- Tomcat配置图片保存路径,图片不保存在项目路径下
- Git|Tomcat 自定义错误页面(例如404页面等等)
- eclipse 指定文件上传到tomcat的路径
- Tomcat|Tomat之——多项目jar包共享配置
- 读how|Tomcat源码5
- 技术学习|Tomcat 内存泄露问题
- Tomcat|解决Tomcat项目部署过程中的 内存溢出