Thank you Porfiriev.

In my real-world use, though, redirecting sysout and syserr isn't going
to give me the behavior I'm looking for -- not without a lot of
additional work, anyway.  What I'm doing is writing a "Logger" EJB which
is the central log manager for a fairly rich, distributed application
environment.  The Logger can write to console (sysout, syserr), or to
the application log file, or to a back-end RDBMS, depending on what it's
being asked to log, how it's configured, etc.; and apps anywhere in the
enterprise can use it as a central service.  So I need to keep console
output and persistent file output separate from each other.  Simplest
way I can think of is to use the same log writer which the
ServletContext uses -- you'd think that would be straightforward.
Haven't succeeded yet though!

Thanks again for the suggestion,

--Mark

===============================

Hello Mark,

Sunday, November 05, 2000, 1:38:08 AM, you wrote:

M> Folks:

M> How do you write to the default-application.log from an EJB?
M> From a servlet you call getServletContext().log().  Can find anything

M> analogous in EJB-Land.
M> Thanks for your help!  (Sorry if this is documented somewhere --
M> couldn't find it, if it is.)
M> --Mark

if you run orion like
 java -jar orion.jar 1>log/orion.log 2>log/orion.err

you can use
     System.out.println("DEBUG:...");
     System.err.println("Error:...");

to write to this logs

--
Best regards,
 Porfiriev




Reply via email to