Logback first looks for logback-test.xml.

 

Would it be permissible for you to provide _that_ and then from within that do 
your own stuff, and then include the official logback.xml?

 

If it can inspire, I am using the facility of logback looking for logback.xml 
in the classpath, and then it only consist of an include instruction to allow 
me to locate the actual configuration in a file relative to my current working 
directory.

 

From: [email protected] [mailto:[email protected]] On 
Behalf Of Vitor Granzinoli Vellozo
Sent: 30. maj 2011 14:15
To: logback users list
Subject: [logback-user] RES: Doubt about multiple configurations

 

 

David,

 

It’s almost that!

My problem is I have to use a specific logback configuration and I cannot 
modify it, because the

Client archteture do not allow this possibility to us.

 

So, that “include” you suggested, unfortunatelly I also cannot use.

 

Is there a possibility to use another logback configuration totally separated 
from the

application logback configuration?

 

Is there a possibility to have a logback.xml to the application and another 
logback_specific.xml to specific

application points, to generate a specific business log?

 

Thank you very much,

Vitor

 

 

De: [email protected] [mailto:[email protected]] Em nome de 
David Roussel
Enviada em: sexta-feira, 27 de maio de 2011 16:49
Para: logback users list
Assunto: Re: [logback-user] Doubt about multiple configurations

 

In your main logback.XML you can include another like this:

 

<configuration>


  <include file="src/main/java/chapters/configuration/includedConfig.xml"/>





  <root level="DEBUG">


    <appender-ref ref="includedConsole" />


  </root>





</configuration>

 

 

Then in your second file you can configure multiple appenders. 

 

Does that work? I'm not 100% sure I understand the question. 

 

David

On 26 May 2011, at 19:38, "Vitor Granzinoli Vellozo" 
<[email protected]> wrote:

 

Hi Logbackers,

 

In my application, I need multiple configurations to generate multiple files.

 

The first problem is, I have to use one logback configuration with no 
modifications (because we have to use a

proprietary framework, it is a framework of our client), so I have to keep a 
main configuration.

 

The second problem is, the business of my application needs more than 3 
different logs, so I need at list one more

Logback configuration where I can put more than one file appender.

 

My question is: How can I have one more logback configuration that do not have 
any application dependencies. That

can be read from a “Helper/Util” class without any help from the infrastruture 
(ex: Spring).

 

Or, if anyone have another idea?

 

Thanks a lot!

Vitor

 

 

 

 

_______________________________________________
Logback-user mailing list
[email protected]
http://qos.ch/mailman/listinfo/logback-user

_______________________________________________
Logback-user mailing list
[email protected]
http://qos.ch/mailman/listinfo/logback-user

Reply via email to