public inbox for [email protected]  
help / color / mirror / Atom feed
Subject: [Pljava-dev] pljava error logging levels
Date: Mon, 12 Jul 2010 13:47:27 -0700
Message-ID: <[email protected]> (raw)

Hello, I had several questions about the ELogHandler in pljava, was hoping someone could comment on it.

In postgres there is code to handle the filtering of logging levels and this is controlled by several gucs for different types of logging.  For instance log_min_messages is used to control the logging level that gets written to the log file, while client_min_messages is used to control the logging level that gets displayed to the client.  Looking at ELogHandler.java I see that pljava bases its own decision on how the JVM should filter logging level based on the setting of log_min_messages <b>at the time of JVM initialization</b>.

This has several consequences, including:
   1) Future changes to the logging level are ignored by the JVM which will continue to use the setting at JVM initialization.
   2) The setting of client_min_messages is ignored, so a setting where INFO messages should be returned to the client but not written to the log is not handled correctly.

Question) Why does PLJava even try to install its own log level filtering when the Postgres logger already is handling this?


Additionally there seems to an additional problem with the actual mapping of logging levels.

In Java there are the following logging levels, from highest to lowest:   SEVERE, WARNING, INFO, CONFIG, FINE, FINER, FINEST
In Postgres the logging levels, from highest to lowest are: PANIC, FATAL, ERROR, WARNING, NOTICE, INFO, LOG, DEBUG1, DEBUG2, ...

pljava creates a mapping as follows:
  SEVERE  => ERROR
  WARNING => WARNING
  INFO  => INFO
  CONFIG => NOTICE
 
Note that in Java "CONFIG" is a finer logging level than "INFO", whereas in Postgres "NOTICE" is a coarser logging level than "INFO", which makes this mapping of error levels incorrect.

Thanks,
   Caleb



view thread (7+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Subject: Re: [Pljava-dev] pljava error logging levels
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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