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 CC0A4DBA11 for ; Wed, 23 Nov 2005 22:34:38 -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 25111-01 for ; Thu, 24 Nov 2005 02:34:42 +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 3FE05DB2EE for ; Wed, 23 Nov 2005 22:34:35 -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 1Ef6wX-00054K-LZ; Thu, 24 Nov 2005 15:34:37 +1300 Message-ID: <438526BC.7080406@opencloud.com> Date: Thu, 24 Nov 2005 15:34:36 +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> <4384FB26.1020902@opencloud.com> In-Reply-To: <4384FB26.1020902@opencloud.com> 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/186 X-Sequence-Number: 14284 Oliver Jowett wrote: > 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 just committed something like this to CVS HEAD -- loglevel is now handled per connection (previously it was effectively driver-wide, despite being specified as part of the connection URL), and logging output now has both a connection ID and timestamp on each line. -O