grails log4j diffrerent appenders according files

后端 未结 1 598
情深已故
情深已故 2021-01-03 08:53

I would like to log to different appenders depending on the module...

I have 3 appenders: the console, a rolling file to log the controller and services, and another

相关标签:
1条回答
  • 2021-01-03 09:33

    I think you need to add additivity: false to the custom appenders.

    debug rollingFileImport: [foo, bar, baz]
          additivity: false
    
    info rollingFileGrailsApp: [foo1, bar1, baz1]
         additivity: false
    

    Refer Logger Inheritance in grails.

    0 讨论(0)
提交回复
热议问题