[logback-user] Logback-beagle with config file used for multiple environments

Noremac cam at byu.edu
Thu Jul 26 18:59:07 CEST 2012


Chris Pratt <thechrispratt at ...> writes:

> 
> 
> I think you can put it in logback-test.xml
>  (*Chris*)
> 
> On Tue, Jul 24, 2012 at 3:31 PM, Noremac <cam at byu.edu> 
wrote:I found the newly released Logback-Beagle to look pretty cool. I want it!
> However, I see that you need to add the tag <consolePlugin /> to the config
> file. This makes me worry a little about the implications on this when that
> same config file is used in test and production.
> So it looks like if I add the consolePlugin then I'll be having an added
> appender trying to spit out logs to the local machine (not desired).
> Basically, I only want the extra appender in development. Is there any other
> way to do this other than doing it programmatically (by doing a check on
> which environment it is in).
> _______________________________________________
> Logback-user mailing listLogback-user-
vdLmLxQ6Fys at public.gmane.orghttp://mailman.qos.ch/mailman/listinfo/logback-user
> 
> 
> 
> 
> 
> 
> _______________________________________________
> Logback-user mailing list
> Logback-user at ...
> http://mailman.qos.ch/mailman/listinfo/logback-user

I could put it in the logback-test.xml file, but that won't change anything as 
only either the logback-test.xml or logback.xml will be used for configuration. 
I'd still need an external mechanism to put a different file in the class path 
based on the environment. I want to use the same code for every environment.

I have added logic to programmatically set up the SocketAppender and add it to 
the root logger if the environment is development. It's working well, just not 
sure this is the best way given my preferences.



More information about the Logback-user mailing list