Return-Path: Delivered-To: apmail-logging-log4j-user-archive@www.apache.org Received: (qmail 48901 invoked from network); 21 Jun 2009 07:32:07 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 21 Jun 2009 07:32:07 -0000 Received: (qmail 99492 invoked by uid 500); 21 Jun 2009 07:32:18 -0000 Delivered-To: apmail-logging-log4j-user-archive@logging.apache.org Received: (qmail 99413 invoked by uid 500); 21 Jun 2009 07:32:18 -0000 Mailing-List: contact log4j-user-help@logging.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Log4J Users List" Reply-To: "Log4J Users List" Delivered-To: mailing list log4j-user@logging.apache.org Received: (qmail 99401 invoked by uid 99); 21 Jun 2009 07:32:18 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 21 Jun 2009 07:32:18 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of benedikt.herudek@gmail.com designates 209.85.220.211 as permitted sender) Received: from [209.85.220.211] (HELO mail-fx0-f211.google.com) (209.85.220.211) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 21 Jun 2009 07:32:08 +0000 Received: by fxm7 with SMTP id 7so2607377fxm.22 for ; Sun, 21 Jun 2009 00:31:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=AI0WBWjC6a3giMNPLTfOqsnvzN18sGOFOH/+uN0dRT0=; b=hH7x1T8q752pNDNrDb4pIfhaqN0HMgfw2QRh7W6V40YPIm0xTOPnOQ8y8PECJkkQaZ 5YUlgYJPFf4lFEIjZg7w5rVstE5pu3HJVxhNpt+HMxwfK9tmfzZrVLOebL3zovEWxosR POHRsOP34DTCjAm2hTR0LZg0l59TbcINle7AY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=BTVkSxttQQJELW6MemZEF6O4Gt+jeMel+USbk39TKspAj6z5MzyV3ZM7bPtP60AQ70 t3dAUy6Z1YGdoPYh/uOCV6mEiYZ19r72mN85b+cud5GyN7/gaeqA1DOIUJ9EkuNlebL2 +UES83X5kBAnci6VBgtx1duBsEJEuRJwqqJgM= MIME-Version: 1.0 Received: by 10.204.8.84 with SMTP id g20mr2158546bkg.162.1245569508001; Sun, 21 Jun 2009 00:31:48 -0700 (PDT) In-Reply-To: References: Date: Sun, 21 Jun 2009 09:31:47 +0200 Message-ID: Subject: Re: concurrency issues with one log file for multiple From: benedikt herudek To: Log4J Users List Content-Type: multipart/alternative; boundary=0015174c358c114766046cd6c07b X-Virus-Checked: Checked by ClamAV on apache.org --0015174c358c114766046cd6c07b Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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 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.herudek@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 > > > --0015174c358c114766046cd6c07b--