NutzCN Logo
问答 配置完log4j,控制台没打印
发布于 2894天前 作者 qq_6ebbba40 2098 次浏览 复制 上一个帖子 下一个帖子
标签:

出来是哪里出问题了????

5 回复

什么都没有?完全空白?? 贴log4j.properties看看

log4j.rootLogger=debug,Console

log4j.appender.Console=org.apache.log4j.ConsoleAppender
log4j.appender.Console.layout=org.apache.log4j.PatternLayout
log4j.appender.Console.layout.ConversionPattern=%d %l %-5p - %m%n

这是控制台打印的信息

十二月 20, 2016 10:49:11 上午 org.apache.tomcat.util.digester.SetPropertiesRule begin
警告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:nutzbook' did not find a matching property.
十二月 20, 2016 10:49:11 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server version:        Apache Tomcat/8.0.30
十二月 20, 2016 10:49:11 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server built:          Dec 1 2015 22:30:46 UTC
十二月 20, 2016 10:49:11 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server number:         8.0.30.0
十二月 20, 2016 10:49:11 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: OS Name:               Windows 7
十二月 20, 2016 10:49:11 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: OS Version:            6.1
十二月 20, 2016 10:49:11 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Architecture:          x86
十二月 20, 2016 10:49:11 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Java Home:             C:\Program Files (x86)\Java\jre1.8.0_25
十二月 20, 2016 10:49:11 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: JVM Version:           1.8.0_25-b18
十二月 20, 2016 10:49:11 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: JVM Vendor:            Oracle Corporation
十二月 20, 2016 10:49:11 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: CATALINA_BASE:         E:\weixin\.metadata\.plugins\org.eclipse.wst.server.core\tmp1
十二月 20, 2016 10:49:11 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: CATALINA_HOME:         D:\apache-tomcat-8.0.30
十二月 20, 2016 10:49:11 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcatalina.base=E:\weixin\.metadata\.plugins\org.eclipse.wst.server.core\tmp1
十二月 20, 2016 10:49:11 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcatalina.home=D:\apache-tomcat-8.0.30
十二月 20, 2016 10:49:11 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dwtp.deploy=E:\weixin\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps
十二月 20, 2016 10:49:11 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Djava.endorsed.dirs=D:\apache-tomcat-8.0.30\endorsed
十二月 20, 2016 10:49:11 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dfile.encoding=GBK
十二月 20, 2016 10:49:11 上午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler ["http-nio-8090"]
十二月 20, 2016 10:49:11 上午 org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
信息: Using a shared selector for servlet write/read
十二月 20, 2016 10:49:11 上午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler ["ajp-nio-8009"]
十二月 20, 2016 10:49:11 上午 org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
信息: Using a shared selector for servlet write/read
十二月 20, 2016 10:49:11 上午 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 635 ms
十二月 20, 2016 10:49:11 上午 org.apache.catalina.core.StandardService startInternal
信息: Starting service Catalina
十二月 20, 2016 10:49:11 上午 org.apache.catalina.core.StandardEngine startInternal
信息: Starting Servlet Engine: Apache Tomcat/8.0.30
十二月 20, 2016 10:49:12 上午 org.apache.catalina.util.SessionIdGeneratorBase createSecureRandom
信息: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [320] milliseconds.
十二月 20, 2016 10:49:14 上午 org.apache.jasper.servlet.TldScanner scanJars
信息: 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.
log4j:WARN No appenders could be found for logger (org.nutz.mvc.NutFilter).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
十二月 20, 2016 10:49:15 上午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["http-nio-8090"]
十二月 20, 2016 10:49:15 上午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["ajp-nio-8009"]
十二月 20, 2016 10:49:15 上午 org.apache.catalina.startup.Catalina start
信息: Server startup in 3643 ms

@qq_6ebbba40 看上去没放对地方

解决方法就是文件名log4j.properties多了一个空格

添加回复
请先登陆
回到顶部