[logback-user] logback.xml and logback-test.xml
ceki at qos.ch
Wed Oct 7 19:28:15 UTC 2015
Logback's status messages will tell you which logback.xml file is being
picked. Dump logback's internal status messages by adding the following
code some where in your code:
LoggerContext lc = (LoggerContext) LoggerFactory.getILoggerFactory();
// print logback's internal status
See link  below for more details.
Alternatively, add an "on console" status listener by defining the
"logback.statusListenerClass" property when you launch java as in:
See link  below for details.
I hope this helps,
On 10/7/2015 20:11, Trupti Mali wrote:
> This is my very first post to this mailing list.
> I need one help from logback users. I wanted to setup logback with two sets of config files. 1) for production and 2) for test
> hence referring to the instrucitons posted on logback website - I added logback-test.xml and logback.xml to my config file. I was expecting logback-test.xml to be picked up first over logback.xml . But at runtime only logback.xml is getting picked. Can these two files coexist and can we still manage to get one of them picked during runtime and how?
> Help much appreciated.
More information about the logback-user