Re: [JDBC] New driver logging proposal - Mailing list pgsql-jdbc

From Daniel Migowski
Subject Re: [JDBC] New driver logging proposal
Date
Msg-id 41ED3F5450C90F4D8381BC4D8DF6BBDCAF6CED75@EXCHANGESERVER.ikoffice.de
Whole thread Raw
In response to Re: [JDBC] New driver logging proposal  (Vladimir Sitnikov <sitnikov.vladimir@gmail.com>)
List pgsql-jdbc

Hello Vladimir,

 

Von: Vladimir Sitnikov [mailto:sitnikov.vladimir@gmail.com]
Gesendet: Sonntag, 9.
April 2017 23:55

I wonder if adding "logging=true" property is required to meed the performance requirements at all.

I would like to refrain from adding new configuration options.

 

What bothers me with "replace jul with abc" approach is it will be yet another 100500+lines change that is hard to review.

I wonder how far can we go with keeping jul interfaces. Is it possible/enough to just add relevant "log level caching at the resultset/etc levels"?

 

I didn’t want to use slfj, also because it is still another extra layer that does the logging. The layer I wanted to add would have added a NullLogger, where all logging functions have empty code, are inlined by the JVM and each call would result in assembly code that does only check if the instance of the logger is still the NullLogger and then does nothing more! It just thought this to be cleaner than log level caching, because then we can spare the level caching code. Think of the wrapper as exactly that: A log level cache.

 

Daniel>Show connection IDs in the log messages to identify connections, and not in logging categories

 

ConnectionIDs are unpredictable, so I can hardly imagine a case when end-user would activate logging based on the connection id (e.g. enable debug for a specific ID only).

On the other hand, having something like "org.postgresql.sql.DB_NAME.USER_NAME.CONN_ID" as a logging category could make sense.

 

I wanted to use an incrementing ID as a connection ID, didn’t know the term meant something else.

 

pgsql-jdbc by date:

Previous
From: Dave Cramer
Date:
Subject: Re: [JDBC] New driver logging proposal
Next
From: Jorge Solórzano
Date:
Subject: Re: [JDBC] New driver logging proposal