pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Logging from multiple connections
3+ messages / 2 participants
[nested] [flat]

* Logging from multiple connections
@ 2005-11-23 22:56  Kevin Grittner <Kevin.Grittner@wicourts.gov>
  0 siblings, 1 reply; 3+ messages in thread

From: Kevin Grittner @ 2005-11-23 22:56 UTC (permalink / raw)
  To: pgsql-jdbc

Just a couple jdbc logging suggestions.

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.

A timestamp could also be useful, since I'm often trying to find
something in the jdbc log related to events from other logs which have a
timestamp.

If I've missed a way to configure these, please let me know.

-Kevin





^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Logging from multiple connections
@ 2005-11-23 23:28  Oliver Jowett <oliver@opencloud.com>
  parent: Kevin Grittner <Kevin.Grittner@wicourts.gov>
  0 siblings, 1 reply; 3+ messages in thread

From: Oliver Jowett @ 2005-11-23 23:28 UTC (permalink / raw)
  To: Kevin Grittner <Kevin.Grittner@wicourts.gov>; +Cc: pgsql-jdbc

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



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Logging from multiple connections
@ 2005-11-24 02:34  Oliver Jowett <oliver@opencloud.com>
  parent: Oliver Jowett <oliver@opencloud.com>
  0 siblings, 0 replies; 3+ messages in thread

From: Oliver Jowett @ 2005-11-24 02:34 UTC (permalink / raw)
  To: Kevin Grittner <Kevin.Grittner@wicourts.gov>; +Cc: pgsql-jdbc

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



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2005-11-24 02:34 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-11-23 22:56 Logging from multiple connections Kevin Grittner <Kevin.Grittner@wicourts.gov>
2005-11-23 23:28 ` Oliver Jowett <oliver@opencloud.com>
2005-11-24 02:34   ` Oliver Jowett <oliver@opencloud.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox