You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by De...@sns.com.sg on 2001/04/02 10:49:50 UTC

logging statements were logged into different log files.

hi there,

i encountered a problem.

The situation is like this:

I have two programs A & B in two difference directories, and they are
reading their own configuration-files, named as log.config in their own
directory.

The problem is debug messages in program A will get logged into program B.
(I'm sure that program A is reading its own log.config file and the
following is set in the log.config file.

log4j.appender.A1.File=/temp/prog1/logs/A.log

and Program B read its own log.config and the following is set!

log4j.appender.A1.File=/temp/prog2/logs/B.log


Please advice.

Thanks
Derek


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org


Re: logging statements were logged into different log files.

Posted by Paul Glezen <pg...@atdial.net>.
DerekChan@sns.com.sg wrote:

> The situation is like this:
> 
> I have two programs A & B in two difference directories, and they are
> reading their own configuration-files, named as log.config in their own
> directory.
> 

When you say different "programs", do you mean they run different
processes?

> The problem is debug messages in program A will get logged into program B.
> (I'm sure that program A is reading its own log.config file and the
> following is set in the log.config file.
> 

You don't indicate how you are reading the config files.  If you are
letting the log4j static initializer do it for you, keep in mind that it
looks in the classpath for resources.  So if each of those directories
is in the classpath, which ever one is first will get read in.

- Paul

-- 
Beware of bugs in the above code.  I have
only proved it correct, not tried it.
-Don Knuth

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org