Thanks for all the answers so far.
The problem with a reconfigure, is that I will have to do it a 1000+
times.
It is not like the situation where a JDBC driver get's loaded once and
then I could do a reconfigure.  The offending code is utilized much.

I found the source code for the offender.
It is as follows.

        String logPropFile = conf + "cpcm.properties";

        try
        {
            // initialize logging
            PropertyConfigurator.configure(logPropFile);
        }
        catch(Exception e)
        {
            System.out.println("Error: 4 - Could not initialize log4j");
        }

        cat.info("Inside Extractor()");

Poor yes, but not mine to change.

So for a quick and dirty try to fix, I coded this:
PropertyConfigurator.configure("log4j.properties");

It works to a large degree, the console works, but the 'file' appender
does not get reinited and thus is not updated.
Also, the messages from the other module is now coming into my console
window.

Is the Repository(Hiearchy) the only approach?
I am not in a 'web' situation, simply a standalone (call other pgm
obviously).

Thanks,
 chris
 

-----Original Message-----
From: Sikha, Naresh [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, April 20, 2004 11:46 AM
To: 'Log4J Users List'
Subject: RE: Messages getting redirected to non related log file

The offending code is probably programmatically configuring log4j rather
than using a configuration file.

Barring LOG4J having a security mechanism the best you can do is to
guard
your own code and configuration by maintaining your own
Repository(Hierarchy).

https://www.qos.ch/logging/sc.html is an excellent resource for managing
your own Repository.

Thanks.

Naresh Sikha 



-----Original Message-----
From: Peake, Chris [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, April 20, 2004 9:27 AM
To: [EMAIL PROTECTED]
Subject: Messages getting redirected to non related log file


I have a program that logs messages to the console and a file using the
correct appenders. Works great, until I call a 3rd party tool that seems
to
be co-opting my logger somehow. As soon as that program is encountered,
ALL
MY messages start going to his log file and no longer to MY logfile. My
appenders are all named differently.
 
I can't seem to find the root cause.
 
I've tried various releases of log4j.
 
Any ideas?
 
thanks,
 Chris

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to