-
Notifications
You must be signed in to change notification settings - Fork 77
Logging
Chapman Flack edited this page Dec 22, 2015
·
3 revisions
PL/Java uses the standard java.util.logging.Logger Hence, you can write things like:
Logger.getAnonymousLogger().info(
"Time is " + new Date(System.currentTimeMillis()));At present, the logger is hardwired to a handler that maps the current state of
the PostgreSQL configuration setting log_min_messages to a valid Logger level
and that outputs all messages using the backend function ereport(). The
following mapping applies between the Logger levels and the PostgreSQL backend
levels:
| java.util.logging.Level | PostgreSQL level |
|---|---|
| SEVERE | ERROR |
| WARNING | WARNING |
| INFO | INFO |
| FINE | DEBUG1 |
| FINER | DEBUG2 |
| FINEST | DEBUG3 |
See Thoughts on logging for likely future directions in this area.