[logback-user] RES: Doubt about multiple configurations
Vitor Granzinoli Vellozo
vitor.vellozo at cpmbraxis.com
Mon May 30 14:15:08 CEST 2011
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: logback-user-bounces at qos.ch [mailto:logback-user-bounces at qos.ch] 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" <vitor.vellozo at cpmbraxis.com> 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
Logback-user at qos.ch
http://qos.ch/mailman/listinfo/logback-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://qos.ch/pipermail/logback-user/attachments/20110530/bc879f9b/attachment-0001.html>
More information about the Logback-user
mailing list