Hellu,
I use log4j very well with Orion... I have no
problem logging from the EJB into a file..
The point is that you are not allowed to write
directly from a file/read from a file in a EJB.
So, what you do is, tell the Log4j Category class
to log a entry. The Category class than writes, through the apropiate appenders
in for example a file So the EJB doesn't write in the file
directly.
I use a RollingFile and SMTP appender and it works
great.
PS:
1: the same is true for reading for example file
properties: call another class that returns our properties, stored in
files.
2: Use on log.properties file for all your J2EE
applications, otherwise you sure get into problems, as log4j uses static
variables/methods and it is hard, and unnecessary, to use one log4j-core.jar for
every J2EE appication. It works even quite well to have one log4j engine/ config
file..
Good luck,
Ed
|
- Log4j logging for Orion EJBs Joe Sackett
- Eddie