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'
但这并没有帮助我。