<html><body bgcolor="#FFFFFF"><div>In your main logback.XML you can include another like this:</div><div><br></div><span class="Apple-style-span" style="font-family: Verdana, Arial, SunSans-Regular, sans-serif; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.296875); -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469); font-size: medium; "><pre class="prettyprint source" style="padding-top: 2px; padding-right: 2px; padding-bottom: 2px; padding-left: 2px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; background-color: rgb(238, 238, 238); font-family: Courier, 'MS Courier New', Prestige, monospace; border-top-width: 1px; border-top-style: solid; border-top-color: rgb(136, 136, 136); border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(136, 136, 136); background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; white-space: pre; border-right-width: 1px; border-left-width: 1px; border-right-style: solid; border-left-style: solid; border-right-color: rgb(136, 136, 136); border-left-color: rgb(136, 136, 136); background-position: initial initial; background-repeat: initial initial; "><span class="tag" style="color: rgb(0, 0, 136); "><configuration></span><span class="pln" style="color: rgb(0, 0, 0); "><br> </span><b><span class="tag" style="color: rgb(0, 0, 136); "><include</span><span class="pln" style="color: rgb(0, 0, 0); "> </span><span class="atn" style="color: rgb(102, 0, 102); ">file</span><span class="pun" style="color: rgb(102, 102, 0); ">=</span><span class="atv" style="color: rgb(0, 136, 0); ">"src/main/java/chapters/configuration/includedConfig.xml"</span><span class="tag" style="color: rgb(0, 0, 136); ">/></span></b><span class="pln" style="color: rgb(0, 0, 0); "><br><br> </span><span class="tag" style="color: rgb(0, 0, 136); "><root</span><span class="pln" style="color: rgb(0, 0, 0); "> </span><span class="atn" style="color: rgb(102, 0, 102); ">level</span><span class="pun" style="color: rgb(102, 102, 0); ">=</span><span class="atv" style="color: rgb(0, 136, 0); ">"DEBUG"</span><span class="tag" style="color: rgb(0, 0, 136); ">></span><span class="pln" style="color: rgb(0, 0, 0); "><br> </span><span class="tag" style="color: rgb(0, 0, 136); "><appender-ref</span><span class="pln" style="color: rgb(0, 0, 0); "> </span><span class="atn" style="color: rgb(102, 0, 102); ">ref</span><span class="pun" style="color: rgb(102, 102, 0); ">=</span><span class="atv" style="color: rgb(0, 136, 0); ">"includedConsole"</span><span class="pln" style="color: rgb(0, 0, 0); "> </span><span class="tag" style="color: rgb(0, 0, 136); ">/></span><span class="pln" style="color: rgb(0, 0, 0); "><br> </span><span class="tag" style="color: rgb(0, 0, 136); "></root></span><span class="pln" style="color: rgb(0, 0, 0); "><br><br></span><span class="tag" style="color: rgb(0, 0, 136); "></configuration></span></pre><div><span class="tag" style="color: rgb(0, 0, 136); "><br></span></div></span><div><br></div><div>Then in your second file you can configure multiple appenders. </div><div><br></div><div>Does that work? I'm not 100% sure I understand the question. </div><div><br></div><div>David<br><br>On 26 May 2011, at 19:38, "Vitor Granzinoli Vellozo" <<a href="mailto:vitor.vellozo@cpmbraxis.com">vitor.vellozo@cpmbraxis.com</a>> wrote:<br><br></div><div></div><blockquote type="cite"><div>
<div class="WordSection1">
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Hi Logbackers,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">In my application, I need multiple configurations to
generate multiple files.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">The first problem is, I have to use one logback
configuration with no modifications (because we have to use a<o:p></o:p></p>
<p class="MsoNormal">proprietary framework, it is a framework of our client), so
I have to keep a main configuration.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">The second problem is, the business of my application needs
more than 3 different logs, so I need at list one more<o:p></o:p></p>
<p class="MsoNormal">Logback configuration where I can put more than one file
appender.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">My question is: How can I have one more logback
configuration that do not have any application dependencies. That<o:p></o:p></p>
<p class="MsoNormal">can be read from a “Helper/Util†class without
any help from the infrastruture (ex: Spring).<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Or, if anyone have another idea?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks a lot!<o:p></o:p></p>
<p class="MsoNormal">Vitor<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>Logback-user mailing list</span><br><span><a href="mailto:Logback-user@qos.ch">Logback-user@qos.ch</a></span><br><span><a href="http://qos.ch/mailman/listinfo/logback-user">http://qos.ch/mailman/listinfo/logback-user</a></span><br></div></blockquote></body></html>