2013/8/16 Stephen Cagle <
sam...@gmail.com>:
> Sorry if I am being dense, just want to make sure I understand what you are
> saying...
>
> So, I was including logback.xml in my git source control. I take it you
> would say that is a bad idea? I thought it made sense as I then have it as
> part of the project, but I suppose it could get in the way in situations
> like this. Do you gitignore your logback.xml and just have a custom
> logback.xml specified with "logback.configurationFile" for different aspects
> (development, testing, production)?
A simple configuration idea (supposing you are using leiningen for
projects base and derive, and that you own both projects so you can
make changes to both).
base plays the role of a "library". A library should not impose
logging settings on the final products that will use it. But you still
need a logging file to test the library ! Just put a logback-test.xml
file in your dev-resources directory. It's fine to have it in git,
then, since it won't be part of the final jar now, it's all that
matters.
You do this for each "library" in your application.
For the final product, the one you deliver, you can just have 2
configurations, one for test, one while developing:
- place a file logback-test.xml in dev-resources. When it is present,
it will be picked first, meaning it will be picked first in your local
machine.
- place the production file logback.xml in resources.
This is a simple settings. It doesn't handle the case where you want
different logback.xml files for test, staging and prod servers, for
instance. YMMV.
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an