[Pljava-dev] pljava error logging levels

From: cwelton at greenplum(dot)com (Caleb Welton)
To:
Subject: [Pljava-dev] pljava error logging levels
Date: 2010-07-12 20:47:27
Message-ID: 3F082C5B-116B-4CB7-9755-B3D306B8C942@greenplum.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pljava-dev

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

Responses

Browse pljava-dev by date

  From Date Subject
Next Message Claudio Campos 2010-07-15 16:36:22 [Pljava-dev] Unable to find static method with signature (LJava/lang/String)
Previous Message Luca Ferrari 2010-06-21 05:45:09 [Pljava-dev] possible patch for cancelling a trigger operation