log4j = {
appenders {
// console name: 'stdout', layout: pattern(conversionPattern: '%c{2} %m%n')
appender new DailyRollingFileAppender(
name: 'file',
datePattern: "'.'yyyy-MM-dd",
fileName: '../logs/app.log', //storage path of log file
layout: pattern(conversionPattern: '%d{yyyy-MM-dd HH:mm:ss:SSS} %-5p %c{2} %x - %m%n')
)
}
all additivity: true, file: [
'grails.app.controllers',
'grails.app.domain',
'grails.app.services',
'grails.app.jobs',
'grails.app.conf',
'cn'
]
debug 'grails.app.controllers', 'grails.app.services', 'grails.app.domain', 'grails.app.conf', 'grails.app.jobs', 'grails.app.conf.filter', 'cn', 'filter'
}
这个可用
转载于:https://blog.51cto.com/xiaosa/1336787