Tag Archives: logging

Java logging performance pitfalls

by Mikhail Vorontsov

In this article we will discuss possible performance issues with Java loggers. We will not discuss any java.util.logging.Handler implementations, because they are actually based on I/O classes discussed in other articles. Here we will discuss how to use java.util.logging.Logger in order not to write a slow Java logging code.

Logging arguments handling

The most important thing about Logger performance could be found in its JavaDoc:

On each logging call the Logger initially performs a cheap check of the request level (e.g. SEVERE or FINE) against the effective log level of the logger. If the request level is lower than the log level, the logging call returns immediately.

Continue reading