0
我正在使用資源插件和Log4j進行日誌記錄的Grails應用程序。我想禁用來自資源插件的日誌記錄,因爲它對我沒有用,只是用無用的信息填充我的日誌文件。如:如何使用Log4J禁用不同模塊的日誌記錄,例如防止「資源」日誌
File [file] changed. Applying changes to application.
Scheduling reload of resource files due to change of file [file]
Performing a changed file reload
Loading declared resources...
Finished changed file reload
我不希望這樣的信息在我的日誌文件作爲其不適合我有用的,這使得難以讀得在我的日誌文件的其他有用的信息。
有沒有什麼辦法可以禁用特定模塊的日誌記錄,如資源?
我曾嘗試以下解決方法:
off 'grails.app.services.org.grails.plugin.resource',
'grails.app.taglib.org.grails.plugin.resource',
'grails.app.resourceMappers.org.grails.plugin.resource'
但這並沒有幫助我。