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 Edwin Lee <ed...@yahoo.com.sg> on 2007/05/04 05:04:08 UTC
Logging For Multi-Threaded Application
Hi all,
i have a multi-threaded application that needs to log to a single log file, and
am wondering which of the following would yield better performance:
1. Keeping several org.apache.log4j.Logger instances, one for each thread,
configured using the same properties file (and hence all log to the same log
file).
2. Use a single org.apache.log4j.Logger instance for every thread.
Advice, please?
Thanks in Advance,
Edwin
__________________________________
Yahoo! Movies - Search movie info and celeb profiles and photos.
http://sg.movies.yahoo.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org
Re: Logging For Multi-Threaded Application
Posted by geff henderson chang <ge...@gmail.com>.
This is done through the getInstance() method, I believe.
On 5/4/07, James Stauffer <st...@gmail.com> wrote:
> #2 is commonly done for multi-threaded applications.
>
> On 5/3/07, Edwin Lee <ed...@yahoo.com.sg> wrote:
> > Hi all,
> >
> > i have a multi-threaded application that needs to log to a single log file, and
> > am wondering which of the following would yield better performance:
> >
> > 1. Keeping several org.apache.log4j.Logger instances, one for each thread,
> > configured using the same properties file (and hence all log to the same log
> > file).
> >
> > 2. Use a single org.apache.log4j.Logger instance for every thread.
> >
> > Advice, please?
> >
> >
> >
> > Thanks in Advance,
> > Edwin
> >
> >
> >
> >
> > __________________________________
> > Yahoo! Movies - Search movie info and celeb profiles and photos.
> > http://sg.movies.yahoo.com/
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > For additional commands, e-mail: log4j-user-help@logging.apache.org
> >
> >
>
>
> --
> James Stauffer http://www.geocities.com/stauffer_james/
> Are you good? Take the test at http://www.livingwaters.com/good/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org
Re: Logging For Multi-Threaded Application
Posted by James Stauffer <st...@gmail.com>.
#2 is commonly done for multi-threaded applications.
On 5/3/07, Edwin Lee <ed...@yahoo.com.sg> wrote:
> Hi all,
>
> i have a multi-threaded application that needs to log to a single log file, and
> am wondering which of the following would yield better performance:
>
> 1. Keeping several org.apache.log4j.Logger instances, one for each thread,
> configured using the same properties file (and hence all log to the same log
> file).
>
> 2. Use a single org.apache.log4j.Logger instance for every thread.
>
> Advice, please?
>
>
>
> Thanks in Advance,
> Edwin
>
>
>
>
> __________________________________
> Yahoo! Movies - Search movie info and celeb profiles and photos.
> http://sg.movies.yahoo.com/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>
--
James Stauffer http://www.geocities.com/stauffer_james/
Are you good? Take the test at http://www.livingwaters.com/good/
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org