[logback-user] logger configuration

Chris Pratt thechrispratt at gmail.com
Thu Nov 29 18:38:27 CET 2018


Yes,

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

should do it.
(*Chris*)

On Thu, Nov 29, 2018 at 8:48 AM Joud Kassem <joud.kassem79 at gmail.com> wrote:

> 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
>
>
> _______________________________________________
> logback-user mailing list
> logback-user at qos.ch
> http://mailman.qos.ch/mailman/listinfo/logback-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.qos.ch/pipermail/logback-user/attachments/20181129/74c90a8e/attachment.html>


More information about the logback-user mailing list