<html><head></head><body bgcolor="#FFFFFF"><div><div>You have to expose a method from your api and get the application to all it before it does any logging. </div><br>David</div><div><br>On 21 Oct 2011, at 22:03, BAKHTI Mohammed <<a href="mailto:onlymed@hotmail.com">onlymed@hotmail.com</a>> wrote:<br><br></div><div></div><blockquote type="cite"><div>

<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>

<div dir="ltr">
<br>Hello David, sorry about it, <br><br>My question is in general : as i do a code based configuration using Joran configurator : if i have some frameworks in my applications (a webapp or a jar ....) . those frameworks will init before my api, so they will send some logs to stdout or whatever. <br><br>My goal : is how can i be sure that my api (which use logback ) is always initialized firt before all the other. <br><br>is that possible ? <br><br>If i use a logback.xml i see that logback is always the firt launched. so how can i do the same <br><br>Thanks <br><div><hr id="stopSpelling">CC: <a href="mailto:logback-user@qos.ch">logback-user@qos.ch</a><br>From: <a href="mailto:nabble@diroussel.xsmail.com">nabble@diroussel.xsmail.com</a><br>Date: Fri, 21 Oct 2011 21:15:45 +0100<br>To: <a href="mailto:logback-user@qos.ch">logback-user@qos.ch</a><br>Subject: Re: [logback-user] How to start my logback before anything in an      application<br><br>
<meta http-equiv="Content-Type" content="text/html; charset=unicode">
<meta name="Generator" content="Microsoft SafeHTML"><div>And if it's a command line tool, just initialise log back manually before you create any loggers. </div><div><br></div><div>(Mohammed: please create a new email for a new thread. Don't just reply to an existing thread and change the subject, most email software treats it as the same thread.)<br><br>David</div><div><br>On 21 Oct 2011, at 17:57, Chris Pratt <<a href="mailto:thechrispratt@gmail.com">thechrispratt@gmail.com</a>> wrote:<br><br></div><div></div><blockquote><div>I assume you're talking about a Web Application.  If so, check out <a href="http://download.oracle.com/javaee/6/api/javax/servlet/ServletContextListener.html" target="_blank">javax.servlet.ServletContextListener</a>, it's your best bet.<div>

  (*Chris*)<br><br><div class="ecxgmail_quote">On Fri, Oct 21, 2011 at 7:47 AM, BAKHTI Mohammed <span dir="ltr"><<a href="mailto:onlymed@hotmail.com">onlymed@hotmail.com</a>></span> wrote:<br><blockquote class="ecxgmail_quote" style="border-left:1px #ccc solid;padding-left:1ex">





<div><div dir="ltr">
Hello, <br><br>I have  actually an API which use logback and add some specific functions. this API initialize logback in code : joranConfigurator(myconfig.file) <br><br>I dont have any logback.xml in my classpath.<br><br>

My question is how can i start this API (and then logback) at application startup before all the other frameworks and APIs (spring, hibernate, axis...) <br><br>I mean the same way logback init itself with logback.xml at startup<br>

<br>Thanks<br>                                        </div></div>
<br>_______________________________________________<br>
Logback-user mailing list<br>
<a href="mailto:Logback-user@qos.ch">Logback-user@qos.ch</a><br>
<a href="http://mailman.qos.ch/mailman/listinfo/logback-user" target="_blank">http://mailman.qos.ch/mailman/listinfo/logback-user</a><br></blockquote></div><br></div>
</div></blockquote><blockquote><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://mailman.qos.ch/mailman/listinfo/logback-user" target="_blank">http://mailman.qos.ch/mailman/listinfo/logback-user</a></span></div></blockquote><br>_______________________________________________
Logback-user mailing list
<a href="mailto:Logback-user@qos.ch">Logback-user@qos.ch</a>
<a href="http://mailman.qos.ch/mailman/listinfo/logback-user">http://mailman.qos.ch/mailman/listinfo/logback-user</a></div>                                           </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://mailman.qos.ch/mailman/listinfo/logback-user">http://mailman.qos.ch/mailman/listinfo/logback-user</a></span></div></blockquote></body></html>