0
我正在嘗試每個部署日誌記錄工作。我有logging.properties
戰爭檔案WEB-INF/
與內容:蜻蜓9.0.1-最終&每部署日誌記錄
ru.home.level=FINEST
而在servlet的我做的:
protected Logger log = Logger.getLogger("ru.home.Something");
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
log.log(Level.FINEST, "Hello");
resp.getWriter().write("<b>tralalala</b>");
log.log(Level.FINEST, "Bye");
}
根據它應該掃描,發現我的屬性文件在部署期間WildFly日誌配置文件適當的地方。但似乎它根本沒有掃描。我究竟做錯了什麼? (https://docs.jboss.org/author/display/WFLY9/Logging+Configuration#LoggingConfiguration-PerdeploymentLogging) 另外:
/subsystem=logging:read-attribute(name=use-deployment-logging-config)
回報:
{
"outcome" => "success",
"result" => true
}
如果您將屬性從'ru.home.level = FINEST'更改爲'ru.home.Something.level = FINEST',它會工作嗎? – jmehrens