zoukankan      html  css  js  c++  java
  • idea 控制台log日志中文乱码解决方案

    一、开发工具概况

    开发工具概况
    JDK 1.8
    Tomcat 7.0.92
    IntelliJ IDEA 2018.2.1

    二、乱码问题展示(部分内容)

    ······
    
    浜旀湀 31, 2019 2:01:53 涓嬪崍 org.apache.catalina.startup.TaglibUriRule body
    淇℃伅: TLD skipped. URI: http://java.sun.com/jsp/jstl/sql is already defined
    浜旀湀 31, 2019 2:01:53 涓嬪崍 org.apache.catalina.startup.TaglibUriRule body
    淇℃伅: TLD skipped. URI: http://java.sun.com/jstl/xml_rt is already defined
    浜旀湀 31, 2019 2:01:53 涓嬪崍 org.apache.catalina.startup.TaglibUriRule body
    淇℃伅: TLD skipped. URI: http://java.sun.com/jstl/xml is already defined
    浜旀湀 31, 2019 2:01:53 涓嬪崍 org.apache.catalina.startup.TaglibUriRule body
    淇℃伅: TLD skipped. URI: http://java.sun.com/jsp/jstl/xml is already defined
    浜旀湀 31, 2019 2:01:53 涓嬪崍 org.apache.catalina.startup.TldConfig execute
    淇℃伅: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
    [2019-05-31 02:01:53,706] Artifact DataExchangeCenter_xj:war exploded: Artifact is deployed successfully
    [2019-05-31 02:01:53,707] Artifact DataExchangeCenter_xj:war exploded: Deploy took 5,301 milliseconds

    三、解决方案

    方法a、

             修改tomcat的配置文件   apache-tomcat-7.0.92conflogging.properties 

             将所有的 ···.encoding = UTF-8   改为   ···.encoding = GBK  重启服务即可。

    ############################################################
    
    1catalina.org.apache.juli.FileHandler.level = FINE
    1catalina.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
    1catalina.org.apache.juli.FileHandler.prefix = catalina.
    1catalina.org.apache.juli.AsyncFileHandler.encoding = GBK
    
    2localhost.org.apache.juli.FileHandler.level = FINE
    2localhost.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
    2localhost.org.apache.juli.FileHandler.prefix = localhost.
    2localhost.org.apache.juli.AsyncFileHandler.encoding = GBK
    
    3manager.org.apache.juli.FileHandler.level = FINE
    3manager.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
    3manager.org.apache.juli.FileHandler.prefix = manager.
    3manager.org.apache.juli.AsyncFileHandler.encoding = GBK
    
    4host-manager.org.apache.juli.FileHandler.level = FINE
    4host-manager.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
    4host-manager.org.apache.juli.FileHandler.prefix = host-manager.
    4host-manager.org.apache.juli.AsyncFileHandler.encoding = GBK
    
    java.util.logging.ConsoleHandler.level = FINE
    java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
    java.util.logging.ConsoleHandler.encoding = GBK
    
    
    ############################################################

    效果展示:

    五月 31, 2019 1:55:36 下午 org.apache.catalina.startup.TaglibUriRule body
    信息: TLD skipped. URI: http://java.sun.com/jstl/sql is already defined
    五月 31, 2019 1:55:36 下午 org.apache.catalina.startup.TaglibUriRule body
    信息: TLD skipped. URI: http://java.sun.com/jsp/jstl/sql is already defined
    五月 31, 2019 1:55:36 下午 org.apache.catalina.startup.TaglibUriRule body
    信息: TLD skipped. URI: http://java.sun.com/jstl/xml_rt is already defined
    五月 31, 2019 1:55:36 下午 org.apache.catalina.startup.TaglibUriRule body
    信息: TLD skipped. URI: http://java.sun.com/jstl/xml is already defined
    五月 31, 2019 1:55:36 下午 org.apache.catalina.startup.TaglibUriRule body
    信息: TLD skipped. URI: http://java.sun.com/jsp/jstl/xml is already defined
    五月 31, 2019 1:55:36 下午 org.apache.catalina.startup.TldConfig execute
    信息: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
    [2019-05-31 01:55:37,824] Artifact EnterpriseQuerySystem:war exploded: Artifact is deployed successfully
    [2019-05-31 01:55:37,824] Artifact EnterpriseQuerySystem:war exploded: Deploy took 3,762 milliseconds

    改后出现个问题,之前   System.out.println(time);  中文不乱码,现在乱码了,暂未 解决

  • 相关阅读:
    012_py之证书过期监测及域名使用的py列表的并集差集交集
    一些java的书籍
    java之内的工具分享,附带下载链接,方便以后自己寻找
    javascript的 == 与 === 的区别
    论httpclient上传带参数【commons-httpclient和apache httpclient区别】
    java操作小技巧,遇到过的会一直更新,方便查找
    常用jsp include用法,三种include的区别
    mybatis中的#和$的区别
    单例模式
    jQuery获取Select选择的Text和 Value(转)用时比较方便寻找
  • 原文地址:https://www.cnblogs.com/cosmosray/p/13268795.html
Copyright © 2011-2022 走看看