0

编译并运行我的应用程序后,控制台中将显示以下错误,我不知道如何超越它们。

INFO: PWC1412: WebModule[null] ServletContext.log():Closing Spring root WebApplicationContext
SEVERE: log4j:ERROR LogMananger.repositorySelector was null likely due to error in class reloading, using NOPLoggerRepository.
INFO: PWC1412: WebModule[null] ServletContext.log():No Spring WebApplicationInitializer types detected on classpath
INFO: Initializing Mojarra 2.1.6 (SNAPSHOT 20111206) for context ''
SEVERE: log4j:WARN No appenders could be found for logger (org.apache.commons.digester.Digester).
SEVERE: log4j:WARN Please initialize the log4j system properly.
4

1 回答 1

1

看起来你还没有配置 log4j 记录器,在你的类路径中添加一个 log4j.properties 文件。

一个基本的 log4j.properties 文件可以是

# Set root logger level to DEBUG and its only appender to A1.
log4j.rootLogger=OFF, A1

# A1 is set to be a ConsoleAppender.
log4j.appender.A1=org.apache.log4j.ConsoleAppender

# A1 uses PatternLayout.
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
log4j.appender.A1.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n

文档

于 2013-10-15T03:50:35.723 回答