Be sure that all your Loggers use the same file appender (only once 
configured). The behaviour of several file appender instances writing to the 
same file (in different threads) is undefined and should be avoided. 
Heri

-----Ursprüngliche Nachricht-----
Von: Yair Ogen [mailto:yairo...@gmail.com] 
Gesendet: Sonntag, 21. Juni 2009 09:46
An: Log4J Users List
Betreff: [SPAM (Bayesain Analysis)] - Re: concurrency issues with one log file 
for multiple - Bayesian Filter detected spam

AFAIK.

On Sun, Jun 21, 2009 at 10:31 AM, benedikt herudek < 
benedikt.heru...@gmail.com> wrote:

> I am using one logger per session and use the name of the logger to 
> place in the log file, no nested diagnostic context.
>
> threadsafe in this context means: no blocking of whole file for one 
> session, no building of queues I assume ... ? ... :-)
>
> regards
>
> Benedikt
>
>
> On Sun, Jun 21, 2009 at 8:36 AM, Yair Ogen <yairo...@gmail.com> wrote:
>
> > log4j  is thread safe and should handle the concurrency efficiently.
> > I suggest you place tour OrderId in the log message using MDC.
> >
> > On Sat, Jun 20, 2009 at 12:12 PM, benedikt herudek < 
> > benedikt.heru...@gmail.com> wrote:
> >
> > > Hi,
> > >
> > > we are intending to use log4J in a call center: we have around 100 
> > > simultaneous sessions working on one tool to create orders. W set 
> > > up
> one
> > > logger per session (identified by basically the order id). All 
> > > these loggers will write to one log file produced by log4J.
> > >
> > > Since we didnt use log4J before we want to be sure we are not 
> > > creating concurrency issues and performance bottlenecks with 
> > > having 100 session writing to one file. E.g. worst case scenario: 
> > > 1st session loggs the
> file
> > > throughout its complete session and only releases it at the end, 
> > > then
> in
> > > the
> > > meanwhile all other sessions queue up and wait. Rather, we 
> > > suspect,
> log4J
> > > is
> > > automatically able to handle such a multiple sessions writing to 
> > > one
> file
> > > situation and we dont have to bother with the details of that
> mechanism.
> > >
> > > Does anyone have experience, information, weblinks to 
> > > documentation,
> tips
> > > or
> > > comments as to that problem ... ? ...:-)
> > >
> > > thx a lot !!!
> > >
> > > gruesse / regards / groetjes / adios
> > >
> > > Benedikt Herudek
> > >
> >
>


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-user-h...@logging.apache.org

Reply via email to