As far as I know, you do *not* lose the layout
feature with SocketAppender. 

The idea is that the LogEvent is serialised over 
the socket, and the receiving end (ie the 
SocketServer) applies whatever layout the
*server* is configured with. This means that
the server can ensure consistent message layout
in its output file.

The SocketServer command-line params include
a way to specify the configuration file.

Regards,

Simon


> -----Original Message-----
> From: John Brunton [SMTP:[EMAIL PROTECTED]]
> Sent: Tuesday, February 27, 2001 5:19 PM
> To:   LOG4J Users Mailing List
> Subject:      RE: log4j, EJB, J2EE RI
> 
> The SocketAppender looks interesting but from the information I've dug up
> (and you do a lot of digging with this product), you loose the use of the
> layout which is a very nice feature.
> 
> I was contemplating, having a method call in the EJB's that does a
> URLConnection and pass the message off to a Servlet which could handle
> logging the message to a FileAppender. That way, I could retain the layout
> and use the FileAppender.
> 
> Would this concept be a problem?
> 
> 
> 
> -----Original Message-----
> From: Kitching Simon [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, February 27, 2001 4:38 AM
> To: 'LOG4J Users Mailing List'
> Subject: RE: log4j, EJB, J2EE RI
> 
> 
> Hi John,
> 
> It has been mentioned several times
> on this list that the FileAppender really
> shouldn't be used for EJB development.
> FileAppender isn't designed for
> multiple processes writing to the
> same file, and (as you have seen)
> there are also security/access issues
> with creating a file on disk.
> 
> I suggest using the SocketAppender,
> JMSAppender, DatagramStringAppender
> (see contribs dir), or write an appender
> that forwards log messages to the
> logging api that comes with your EJB engine.
> 
> Note that I haven't used log4j with EJBs myself .
> 
> Regards,
> 
> Simon
> 
> > -----Original Message-----
> > From:       John Brunton [SMTP:[EMAIL PROTECTED]]
> > Sent:       Monday, February 26, 2001 10:59 PM
> > To: log4j-user @jakarta.apache.org
> > Subject:    log4j, EJB, J2EE RI
> >
> > Being new to the log4j community, I find using log4j a little difficult
> at
> > times. At present, I am able to log messages, etc using the
> FileAppender,
> > except from within an EJB running under the J2EE RI. I get the dreaded
> > java.security.AccessControlException: access denied for my log file.
> >
> > What are my options as I need to be able to log from within an EJB?
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to