Grails and Log4J : How to logs in different files with same level?

一笑奈何 提交于 2019-12-04 13:03:44
Burt Beckwith

Create the appenders as file (or rollingFile etc.):

appenders {
   file name: "logfile1", file: "/path/to/logfile1.logs"
   file name: "logfile2", file: "/path/to/logfile2.logs"
}

and then use the Map syntax to partition the two controllers into separate appenders:

debug logfile1: "grails.app.controller.package.Controller1",
      logfile2: "grails.app.controller.package.Controller2"

See http://docs.grails.org/latest/guide/conf.html#logging for more details.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!