[logback-user] logger configuration

Joud Kassem joud.kassem79 at gmail.com
Thu Nov 29 17:44:29 CET 2018


Hi guys,

I'm upgrading my grails 2.5 app to grails 3.3.8 and started using logback,
am new to it. My question is:
I have long package hierarchy, for example:
-----com
----------company
----------------controllers
--------------------client
-----------------------class1.groovy
-----------------------class2.groovy
-----------------------class3.groovy
-----------------------class4.groovy
-----------------------class5.groovy
--------------------auth
-----------------------class1.groovy
-----------------------class2.groovy
-----------------------class3.groovy
-----------------------class4.groovy
-----------------------class5.groovy
--------------------security
-----------------------class1.groovy
-----------------------class2.groovy
-----------------------class3.groovy
-----------------------class4.groovy
-----------------------class5.groovy

I want to define logger for all the controllers (all the included classes),
is it possible to do something like:

logger("com.company.controllers.*", INFO, ['STDOUT'],false) ?

or I have to do like this:

logger("com.company.controllers.client", INFO, ['STDOUT'],false)

logger("com.company.controllers.auth", INFO, ['STDOUT'],false)

logger("com.company.controllers.security", INFO, ['STDOUT'],false)

What is the best solution to not repeat a lot since I have a lot of
child packages.s.

Thanks in advance,

Joud
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.qos.ch/pipermail/logback-user/attachments/20181129/10a0479d/attachment.html>


More information about the logback-user mailing list