You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by DONNIE HALE <DH...@longaberger.com> on 2002/02/08 15:42:11 UTC

Re: AW: Best practice for using Log4j, EJB, Struts, and WebLogic 6.1 together

Well you typically get faster log performance to a file. And there's much more flexibility using regular expressions than select statements. I write all kinds of short Perl scripts to do common log file parsing tasks.

Donnie


>>> simon@klaiber.com 02/08/02 03:48AM >>>
There is a benifit, when you need to do a lot log analyzation or have a lot
very different logging going on, you want to lok at in a convinient way
without looking at 100 log files. You can just put it in a Table and do
analyzes and or use a small (web-based) log-viewer program and have all
choices that you can think a "select" statment for.

Simon


> -----Ursprungliche Nachricht-----
> Von: Eric L. Ma [mailto:eric.ma@comcast.net] 
> Gesendet: Freitag, 8. Februar 2002 02:39
> An: log4j-user@jakarta.apache.org 
> Betreff: Re: Best practice for using Log4j, EJB, Struts, and WebLogic
> 6.1 together
>
>
> What is the benefit of using JDBCAppenders over RFAppenders for EJB
> related logging?  To me log files are so much easier to read, and I
> prefer it over any database, unless there is a fundamental reason
> against it, such as problems related to multiple threads trying to write
> to the same file simultaneously when the app server is under load.
>
>
>
> Donnie: can you provide some details how to set up log4j
> programmatically so that I can use configAndWatch?  I would think a
> stateless session bean loaded into the free pool at server startup can
> be used.  Any other suggestions?
>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: AW: Best practice for using Log4j, EJB, Struts,and WebLogic 6.1 together

Posted by Kevin Steppe <ks...@pacbell.net>.
I think Donnie and Simon have expressed most of the pros/cons of logging to a DB.  I'll just add a bit more -- In a geographically distributed environment, a DB table is often more accessible than a file.  Databases have
all sorts of backup and simultaneous access features that may be useful.  If you are logging events related to your data (i.e.. DataProcessingCodeX created row 123), then the relational nature may be useful -- you can
pull out the log event AND the data together.  SQL gives you nice ad-hoq search functionality with good performance for large log sets.

For EJBs specifically, writing directly to files is -not- guaranteed by the J2EE spec (previous posts to this list describe Oracle's app server closing open files).  In J2EE you're "supposed to" make things persistent to
JMS or DB's or through the connector architecture.  Therefore, if you're logging to a file, your EJBs may not work on another app server.  If you log to a DB, they will work on another app server.  Since you probably
aren't about to buy another vendor's app server, this paragraph is merely about Sun dogma.


DONNIE HALE wrote:

> Well you typically get faster log performance to a file. And there's much more flexibility using regular expressions than select statements. I write all kinds of short Perl scripts to do common log file parsing tasks.
>
> Donnie
>
> >>> simon@klaiber.com 02/08/02 03:48AM >>>
> There is a benifit, when you need to do a lot log analyzation or have a lot
> very different logging going on, you want to lok at in a convinient way
> without looking at 100 log files. You can just put it in a Table and do
> analyzes and or use a small (web-based) log-viewer program and have all
> choices that you can think a "select" statment for.
>
> Simon
>
> > -----Ursprungliche Nachricht-----
> > Von: Eric L. Ma [mailto:eric.ma@comcast.net]
> > Gesendet: Freitag, 8. Februar 2002 02:39
> > An: log4j-user@jakarta.apache.org
> > Betreff: Re: Best practice for using Log4j, EJB, Struts, and WebLogic
> > 6.1 together
> >
> >
> > What is the benefit of using JDBCAppenders over RFAppenders for EJB
> > related logging?  To me log files are so much easier to read, and I
> > prefer it over any database, unless there is a fundamental reason
> > against it, such as problems related to multiple threads trying to write
> > to the same file simultaneously when the app server is under load.
> >
> >
> >
> > Donnie: can you provide some details how to set up log4j
> > programmatically so that I can use configAndWatch?  I would think a
> > stateless session bean loaded into the free pool at server startup can
> > be used.  Any other suggestions?
> >
> >
>
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>