我使用Grails
在我的文件Config.groovy
中,我创建一个附加程序为:
log4j = {
appenders {
file name:'myAppli', file:'/tmp/myAppli.log'
}
...
}
是否可以通过
file.properties
的数据来设置我的附加程序的文件路径?像这样的东西:
file.properties:
myAppli.log.path=C:\\tmp\\
Config.groovy:
appenders {
file name:'myLogs', file:myAppli.log.path + 'myLogs.log'
}
最佳答案
myAppli.log.path应该可以工作!!!
关于grails - log4j:参数附加程序文件名,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14524870/