我正在从我的 grails 1.3.7 应用程序登录,并且在日志中看到基本上重复的记录:
12/07/25 23:57:39 TRACE querium.SearchService: setting snippet for posting 1855803974 [null] 54: document 1534340330 [632]
25 Jul 2012 23:57:39,943 7851 TRACE pool-1-thread-1 SearchService:? gene 60258782 - setting snippet for posting 1855803974 [null] 54: document 1534340330 [632]
我的日志记录是这样配置的:
appenders {
// appender for usage tracking
appender new org.apache.log4j.RollingFileAppender(
name:"usageAppender",
maxFileSize:"100KB",
maxBackupIndex: 10000,
file:"usage.log", // "/tmp/logs/usage.log",
layout:pattern(conversionPattern: '%d{DATE} %5p %c{1}:%L - %m%n')
)
appender new org.apache.log4j.RollingFileAppender(
name:"querium",
maxFileSize:"1000KB",
maxBackupIndex: 10000,
file:"querium.log", // "/tmp/logs/querium.log",
layout:pattern(conversionPattern: '%d{DATE} %8X{memoryused} %5p %t %c{1}:%L %X{username} %X{request} - %m%n')
)
console name:'stdout', layout:pattern(conversionPattern: '%d{DATE} %8X{memoryused} %5p %t %c{1}:%L %X{username} %X{request} - %m%n')
}
root {
error 'querium', 'stdout'
}
error 'org.codehaus.groovy.grails.web.servlet', // controllers
'org.codehaus.groovy.grails.web.pages', // GSP
'org.codehaus.groovy.grails.web.sitemesh', // layouts
'org.codehaus.groovy.grails.web.mapping.filter', // URL mapping
'org.codehaus.groovy.grails.web.mapping', // URL mapping
'org.codehaus.groovy.grails.commons', // core / classloading
'org.codehaus.groovy.grails.plugins', // plugins
'org.codehaus.groovy.grails.orm.hibernate', // hibernate integration
'org.springframework',
'org.hibernate'
warn 'org.mortbay.log'
debug 'grails.app.service'
trace 'grails.app.service.backgroundservice'
error 'org.hibernate.SQL'
trace 'grails.app.controller.com.fxpal.querium.UiController'
trace 'grails.app.controller.com.fxpal.querium.CommentController'
warn 'grails.app.controller.com.fxpal.querium.TopicController'
off 'grails.app.service.com.fxpal.redis.RedisService'
trace 'grails.app.service.com.fxpal.querium.SearchService'
debug 'com.fxpal.cloudwork.docubrowse.SearchDocubrowse'
off 'grails.app.service.com.fxpal.proxy.ProxyService'
debug 'org.codehaus.groovy.grails.plugins.springsecurity.*'
debug 'com.fxpal.querium.CiteSeerDocumentParser'
debug 'com.fxpal.querium.LoggingFilters'
info 'usageAppender':'usage.gui'
正确的数据将发送到usageAppender
. 在这个奥秘中练习的人可以弄清楚为什么我得到双倍的记录,但略有不同,其余记录的记录?
2012 年 7 月 26 日编辑:添加了其余的日志记录配置。