Add your logback-test.xml file to a location that is only on the classpath on your development/test machines (almost always outside of the war file itself), then use the Configuration File Inclusion mechanism to include your production logback.xml file [<a href="http://logback.qos.ch/manual/configuration.html#fileInclusion">http://logback.qos.ch/manual/configuration.html#fileInclusion</a>]<div>

  (*Chris*)<br><br><div class="gmail_quote">On Thu, Jul 26, 2012 at 9:59 AM, Noremac <span dir="ltr"><<a href="mailto:cam@byu.edu" target="_blank">cam@byu.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div class="HOEnZb"><div class="h5">Chris Pratt <thechrispratt@...> writes:<br>
<br>
><br>
><br>
> I think you can put it in logback-test.xml<br>
>  (*Chris*)<br>
><br>
> On Tue, Jul 24, 2012 at 3:31 PM, Noremac <<a href="mailto:cam@byu.edu">cam@byu.edu</a>><br>
wrote:I found the newly released Logback-Beagle to look pretty cool. I want it!<br>
> However, I see that you need to add the tag <consolePlugin /> to the config<br>
> file. This makes me worry a little about the implications on this when that<br>
> same config file is used in test and production.<br>
> So it looks like if I add the consolePlugin then I'll be having an added<br>
> appender trying to spit out logs to the local machine (not desired).<br>
> Basically, I only want the extra appender in development. Is there any other<br>
> way to do this other than doing it programmatically (by doing a check on<br>
> which environment it is in).<br>
> _______________________________________________<br>
</div></div>> Logback-user mailing listLogback-user-<br>
vdLmLxQ6Fys@public.gmane.orghttp://<a href="http://mailman.qos.ch/mailman/listinfo/logback-user" target="_blank">mailman.qos.ch/mailman/listinfo/logback-user</a><br>
><br>
><br>
><br>
><br>
><br>
><br>
> _______________________________________________<br>
> Logback-user mailing list<br>
> Logback-user@...<br>
> <a href="http://mailman.qos.ch/mailman/listinfo/logback-user" target="_blank">http://mailman.qos.ch/mailman/listinfo/logback-user</a><br>
<br>
I could put it in the logback-test.xml file, but that won't change anything as<br>
only either the logback-test.xml or logback.xml will be used for configuration.<br>
I'd still need an external mechanism to put a different file in the class path<br>
based on the environment. I want to use the same code for every environment.<br>
<br>
I have added logic to programmatically set up the SocketAppender and add it to<br>
the root logger if the environment is development. It's working well, just not<br>
sure this is the best way given my preferences.<br>
<div class="HOEnZb"><div class="h5"><br>
_______________________________________________<br>
Logback-user mailing list<br>
<a href="mailto:Logback-user@qos.ch">Logback-user@qos.ch</a><br>
<a href="http://mailman.qos.ch/mailman/listinfo/logback-user" target="_blank">http://mailman.qos.ch/mailman/listinfo/logback-user</a></div></div></blockquote></div><br></div>