X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 87827DB0DE for ; Wed, 23 Nov 2005 19:28:41 -0400 (AST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 99124-06 for ; Wed, 23 Nov 2005 23:28:43 +0000 (GMT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from yass.opencloud.co.nz (yass.opencloud.co.nz [131.203.101.226]) by svr1.postgresql.org (Postfix) with ESMTP id E7EBFDA86D for ; Wed, 23 Nov 2005 19:28:38 -0400 (AST) Received: from 203-79-104-60.cable.paradise.net.nz ([203.79.104.60] helo=[192.168.0.20]) by yass.opencloud.co.nz with asmtp (TLS-1.0:DHE_RSA_AES_128_CBC_SHA:16) (Exim 4.34) id 1Ef42b-0003El-FL; Thu, 24 Nov 2005 12:28:41 +1300 Message-ID: <4384FB26.1020902@opencloud.com> Date: Thu, 24 Nov 2005 12:28:38 +1300 From: Oliver Jowett User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051009) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Kevin Grittner CC: pgsql-jdbc@postgresql.org Subject: Re: Logging from multiple connections References: <43849F580200002500000914@gwmta.wicourts.gov> In-Reply-To: <43849F580200002500000914@gwmta.wicourts.gov> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0 required=5 tests=[none] X-Spam-Score: 0 X-Spam-Level: X-Archive-Number: 200511/183 X-Sequence-Number: 14281 Kevin Grittner wrote: > Wading through loglevel=2 output today, it occurred to me that it would > be nice if the jdbc log file included a prefix with something to > identify the connection. Sometimes you can only get an error to occur > on a busy system with multiple active connections, and the jdbc log > currently mixes everything together, which can make it hard to follow. Yes, this is on my todo list.. The simplest way to do it seems to be to just have a static driver-wide counter to assign IDs to connections. I considered backend PID, but that could in theory be duplicated, and you can always match up PID to connection ID from the initial connection setup logging. -O