Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用嵌入式类型的 hsqldb,并且我想将 log4j 用于所有日志输出。所有其他类都正确使用我的 log4j 配置。但是出于某种原因,hsqldb 仍然在控制台上输出!
<logger name="org.hsqldb"> <level value="FATAL" /> </logger> <root> <priority value="error" /> <appender-ref ref="R" /> </root>
这就是我最终要做的......
server = new Server(); if (log.isTraceEnabled()) { server.setSilent(false); server.setTrace(true); } else { server.setLogWriter(null); server.setSilent(true); server.setTrace(false); }