> Oliver Wong ha escrito:
>>> The problem is that all of them writes in the same file which belongs
>>> to the last application that started in the app server. Any Ideas?,
...
> No, they have a differet one (different ears)
Is log4j included in each ear file, or is it somehow installed
globally on the application server (perhaps as an extension for
the JVM)?
I.e., are all the applications using the same loaded class for
log4j?
/L

Signature
Lasse Reichstein Nielsen - lrn@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'
lmestre - 03 Feb 2006 11:30 GMT
the same class
Oliver Wong - 03 Feb 2006 16:42 GMT
> the same class
Write filters and appenders so that each appender writes to a different
file and the filters give the appenders only the log events they are
interested in.
- Oliver
lmestre - 03 Feb 2006 17:47 GMT
Do i need to create my own class, for example
com.myorg.mypackage.MyClass
which extends for example org.apache.log4j.FileAppender? and the same
for the filter?
Is that correct?
Thanks,
Luz
Oliver Wong ha escrito:
> > the same class
>
[quoted text clipped - 3 lines]
>
> - Oliver
Oliver Wong - 03 Feb 2006 18:25 GMT
> Do i need to create my own class, for example
> com.myorg.mypackage.MyClass
> which extends for example org.apache.log4j.FileAppender? and the same
> for the filter?
> Is that correct?
Yes, that is the basic strategy I proposed. However, note this passage
from the Javadocs:
http://logging.apache.org/log4j/docs/api/org/apache/log4j/spi/Filter.html
<quote>
Note that Category and AppenderSkeleton, the parent class of all standard
appenders, have built-in filtering rules. It is suggested that you first use
and understand the built-in rules before rushing to write your own custom
filters.
</quote>
- Oliver
lmestre - 03 Feb 2006 18:34 GMT
Thanks a lot!
Luz
Oliver Wong ha escrito:
> > Do i need to create my own class, for example
> > com.myorg.mypackage.MyClass
[quoted text clipped - 14 lines]
>
> - Oliver
lmestre - 07 Feb 2006 15:25 GMT
It didn't work. I did the proposed solution and i still have the
problem because every application extends the same appender :
FileAppender
:(
Luz
Raymond DeCampo - 04 Feb 2006 21:42 GMT
>>Oliver Wong ha escrito:
>>
[quoted text clipped - 12 lines]
>
> /L
Have you tried placing a copy of log4j,jar and configuration files in
each EAR?
HTH,
Ray

Signature
This signature intentionally left blank.
lmestre - 07 Feb 2006 15:28 GMT
Have you done that?
I think that is the right solution... but I need to put other jars too
and change the server policies of the class loader .
Luz