[logback-user] Best Practice to Setup Multiple Log Files for Multiple Classes

Dan Franks dan.franks at gmail.com
Thu Oct 11 20:21:08 CEST 2012


Thanks!!!  Good to know the config file was correct.  That made me
look more into the java side and I figured out that my code

private static Logger logger = LoggerFactory.getLogger(orange.class);

should have been

private static Logger logger =
LoggerFactory.getLogger("com.myCompany.orangeClassFileAppender");

Now it works great!  Thanks all for your help.

On Wed, Oct 10, 2012 at 5:24 PM, Abraham Lin
<abraham.lin at post.harvard.edu> wrote:
> Yes, that's correct. Here's the output:
>
> $ grep '' c.m.*
> c.m.default.2012-10-10:2012-10-10 20:21:02, INFO, com.myCompany.Main, main,
> c.m.Main, main Main
> c.m.greenClass.Loader.2012-10-10:2012-10-10 20:21:02, INFO,
> com.myCompany.greenClass, main, c.m.greenClass, <clinit> greenClass
> c.m.orangeClass.2012-10-10:2012-10-10 20:21:02, INFO,
> com.myCompany.orangeClass, main, c.m.orangeClass, <clinit> orangeClass
> c.m.purpleClass.2012-10-10:2012-10-10 20:21:02, INFO,
> com.myCompany.purpleClass, main, c.m.purpleClass, <clinit> purpleClass
>
> _______________________________________________
> Logback-user mailing list
> Logback-user at qos.ch
> http://mailman.qos.ch/mailman/listinfo/logback-user


More information about the Logback-user mailing list