我的日志消息始终在应用引擎日志控制台中显示为“信息”,即使我将消息记录为错误(参见屏幕截图)。
我记录这样的消息:
private static Logger logger = Logger.getLogger(PingServlet.class);
logger.error("Database was successfully pinged!!.");
像这样的配置:
src/main/resources/log4j.properties
# Root logger option
log4j.rootLogger=INFO, stdout
# Direct log messages to stdout
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.Target=System.out
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n
src/main/webapp/WEB-INF/logging.properties
# A default java.util.logging configuration.
# (All App Engine logging is through java.util.logging by default).
#
# To use this configuration, copy it into your application's WEB-INF
# folder and add the following to your appengine-web.xml:
#
# <system-properties>
# <property name="java.util.logging.config.file" value="WEB-INF/logging.properties"/>
# </system-properties>
#
# Set the default logging level for all loggers to WARNING
.level = INFO
我该如何改变呢?我想将错误显示为错误等等。