My Oracle Support Banner

How to Limit JDBC Logging Output (Doc ID 944655.1)

Last updated on AUGUST 09, 2023

Applies to:

JDBC - Version 10.2.0.1 and later
Information in this document applies to any platform.

Goal

How do you limit JDBC logging output?

1. Purpose

The purpose of this article is to provide techniques for limiting JDBC logging output. That is its only purpose.

It is not the intent of this article to show how to use JDBC logging. For instructions on how to use JDBC logging, see the Technical Brief "Oracle JDBC Logging using java.util.logging" at https://www.oracle.com/technetwork/database/enterprise-edition/11-2.pdf

2. Prerequisite

Before using this article you must know how to use JDBC logging and obtain output from it.

3. When to use this article

When the problem for which you wish to obtain JDBC logging occurs intermittently and/or occurs only on an application running in an application server, one or more of the techniques in Solution sections 4 to 9 may be needed to handle the large volume of logging.

These techniques are not usually needed when the problem can be reproduced consistently with a standalone java application since there is less logging output.

4. How to use this article

For most of the techniques, you will likely need to try the technique, carefully doing each step, possibly more than once, in order to understand how they work. Do not expect to master the techniques by just reading the article.

Solution

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Goal
 1. Purpose
 2. Prerequisite
 3. When to use this article
 4. How to use this article
Solution
 1. Java application for the JDBC logging examples
 2. Level FINE produces less output in JDBC 11 than it does in JDBC 10
 3. Limit output by controlling the level of each logger
 4. XMLFormatter
 5. Cascading Style Sheets (CSS)
 6. Extensible Stylesheet Language (XSL)
 7. java.util.logging Filters
 8. Filter and XSL selection used together
 9. Cycled logging files
References

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.