Or you can use log4j and set it up to use a remote socket server or a
UNIX Syslog daemon.  The documentation at
http://jakarta.apache.org/log4j/docs/manual.html mentions the different
logging appenders available.



On a seperate note, log4j - IMHO - ought to be a service via JMX as an
MBean.  I am surprised that the Sun Logging API
(http://java.sun.com/aboutJava/communityprocess/review/jsr047/index.html)
doesn't specify it as such, and instead only defines method calls. 
There is only a passing reference to J2EE containers providing their own
log managers.  Anybody know why MBean integration is ommitted from that
document?

Scott M Stark wrote:
> 
> The J2EE-RI prevents a bean from doing I/O ops from within the bean class using
> a restricted Java2 permission set. You can always get around this by placing the
> code that performs the I/O in the proper location so that its codebase is assigned
> the required permissions. By placing log4j or any logging framework at a codebase
> that allows file I/O you can use it within an EJB and be spec compliant as long
> as logging is not a critical bean function that must be consistent with the 
>transactional
> settings of the EJB.
> 
> ----- Original Message -----
> From: "James Cook" <[EMAIL PROTECTED]>
> To: "JBoss-User" <[EMAIL PROTECTED]>
> Sent: Thursday, March 15, 2001 3:14 PM
> Subject: Re: [jBoss-User] Logging
> 
> > I have yet to see an EJB container that *prevents* you from using File I/O. The
> > spec is very short-sighted (or perhaps it is worded too restrictivly). I don't
> > think they are implying that file I/O is being misused for logging. Just
> > understand that it will not be transactional.
> >
> > p.s. you could always email the log messages. :)
> >
> > jim
> >
> > ----- Original Message -----
> > From: "Jason Mawdsley" <[EMAIL PROTECTED]>
> > To: "JBoss-User" <[EMAIL PROTECTED]>
> > Sent: Thursday, March 15, 2001 5:18 PM
> > Subject: Re: [jBoss-User] Logging
> >
> >
> > > > > > If you write to System.out, it does show up in the logs (I believe at
> > > Info
> > > > > > level?).
> > >
> > > > > > Obviously, this isn't good enough for a lot of purposes. Have you
> > > looked
> > > > > > at log4j?
> > >
> > > From looking at log4j I don't think I can use it.  My beans have to work in
> > > various app servers, hence I can not have file io or singltons.
> > >
> > > Does anyone know of any non app server specific logging mechanism that does
> > > not violate the EJB1.1 spec?
> > >
> > > I really don't want to re-invent the wheel if I can help it!
> > >
> > > Jason
> > >
> > >
> > >
> > > --
> > > --------------------------------------------------------------
> > > To subscribe:        [EMAIL PROTECTED]
> > > To unsubscribe:      [EMAIL PROTECTED]
> > >
> > >
> >
> >
> >
> > --
> > --------------------------------------------------------------
> > To subscribe:        [EMAIL PROTECTED]
> > To unsubscribe:      [EMAIL PROTECTED]
> >
> >
> 
> --
> --------------------------------------------------------------
> To subscribe:        [EMAIL PROTECTED]
> To unsubscribe:      [EMAIL PROTECTED]


--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]

Reply via email to