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 [
http://logback.qos.ch/manual/configuration.html#fileInclusion]
  (*Chris*)

On Thu, Jul 26, 2012 at 9:59 AM, Noremac <[email protected]> wrote:

> Chris Pratt <thechrispratt@...> writes:
>
> >
> >
> > I think you can put it in logback-test.xml
> >  (*Chris*)
> >
> > On Tue, Jul 24, 2012 at 3:31 PM, Noremac <[email protected]>
> 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-
> [email protected]://
> mailman.qos.ch/mailman/listinfo/logback-user
> >
> >
> >
> >
> >
> >
> > _______________________________________________
> > Logback-user mailing list
> > Logback-user@...
> > 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.
>
> _______________________________________________
> Logback-user mailing list
> [email protected]
> http://mailman.qos.ch/mailman/listinfo/logback-user
>
_______________________________________________
Logback-user mailing list
[email protected]
http://mailman.qos.ch/mailman/listinfo/logback-user

Reply via email to