Ceki Culce,<br><br>That worked.....<br>Awesome. Thank You.<br>I&#39;d like to ask you another question....<br>I&#39;d like to use Logback instead of Log4j however Log4j server along with Log4cxx client and with SocketAppender<br>
&quot;understand&quot; each other. That is, I can log with log4j  Server messages (with the SocketAppender) that are<br>coming from the Log4cxx clients and of course log4j clients. Then, I can write all these log messages to just one file<br>
on a server where my Log4j server is running. <br>This is what I&#39;m really after. I know that Log4j, and I assume also logback as well, has JMSAppender. <br>I don&#39;t know that much (yet) about JMS but I wonder if there&#39;s a way to use it to write messages coming<br>
from C++ client, Java or whatever client we may have.... (I know I need to handle Flex clients as well, Oh man!)<br>I know you more knowledgeble in this area........ <br>Please let me know if there is a way to &quot;capture&quot; all these different log messages coming from different clients somehow<br>
and persist them to one repository (like a DB or a flat txt file) <br>Thanks<br>Greg.<br><br><br><br><br><div class="gmail_quote">On Wed, Mar 18, 2009 at 2:39 PM, Ceki Gulcu <span dir="ltr">&lt;ceki@qos.ch&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hello Greg,<br>
<br>
I have not looked at log4j 1.3 code for a long time. Here is some code<br>
that will probably do what you want:<br>
<br>
  // code for log4j 1.3 and not logback<div class="im"><br>
  logger = org.apache.log4j.Logger.getLogger(className);<br>
  JoranConfigurator jc = new JoranConfigurator();<br>
  jc.doConfigure(configFile, LogManager.getLoggerRepository());<br></div>
  ExecutionContext ec =  jc.getExecutionContext();<br>
  for(Object o: ec.getErrorList()) {<br>
    System.out.println(o);<br>
  }<br>
<br>
Again the above code is for log4j 1.3 not logback.<br>
<br>
HTH,<br>
<br>
Greg Flex wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im">
Hi Ceki Gülcü,<br>
<br>
Thanks for your fast reply.<br>
So the problem is that I&#39;m not using the Logback but the Log4j 1.3 alpha 8 version that also has<br></div>
JoranConfigurator object.  (author: Curt Arnold, Ceki Gülcü &lt;<a href="http://www.qos.ch/log4j/" target="_blank">http://www.qos.ch/log4j/</a>&gt;)<div class="im"><br>
I thought I ask you since you&#39;ve written it and you more likely to reply to my message from this forum.<br>
I&#39;m looking at the (Log4j 1.3 alpha 8) API and don&#39;t see any LoggerContext object there.<br>
I have at the moment this in my class:<br>
<br>
public someConstructor(String className, String propertyFile) {<br>
              //Reads the configuration file.<br>
        if (!configFile.endsWith(&quot;xml&quot;) || configFile == &quot;&quot;){<br>
            throw new InvalidParameterException(&quot;Invalid XML property file.&quot;);<br>
        }<br>
             logger = org.apache.log4j.Logger.getLogger(className);<br>
        JoranConfigurator jc = new JoranConfigurator();<br>
        jc.doConfigure(configFile, LogManager.getLoggerRepository());<br>
    }<br>
<br>
</div></blockquote><div><div></div><div class="h5">
-- <br>
Ceki Gülcü<br>
Logback: The reliable, generic, fast and flexible logging framework for Java.<br>
<a href="http://logback.qos.ch" target="_blank">http://logback.qos.ch</a><br>
_______________________________________________<br>
Logback-user mailing list<br>
Logback-user@qos.ch<br>
<a href="http://qos.ch/mailman/listinfo/logback-user" target="_blank">http://qos.ch/mailman/listinfo/logback-user</a><br>
</div></div></blockquote></div><br>