private support for your internal/customer projects ... custom extensions and distributions ... versioned snapshots for indefinite support ... scalability guidance for your apps and Ajax/Comet projects ... development services from 1 day to full product delivery
Table of Contents
This chapter discusses various options for configuring logging.
Jetty provides logging via its own
org.eclipse.jetty.util.log.Logger layer, and does not natively
use any existing Java logging framework. All logging events, produced via
the Jetty logging layer, have a name, a level, and a message. The name is a
FQCN (fully qualified class name) similar to how all existing Java logging
Jetty logging, however, has a slightly different set of levels that it uses internally:
For events serious enough to inform and log, but not fatal.
Debugging events (very noisy).
Exception events that you can safely ignore, but useful for some people. You might see this level as DEBUG under some Java logging framework configurations, where it retains the ignore phrase somewhere in the logging.
Jetty logging produces no FATAL or SEVERE events.
Configure the Jetty logging layer via the
org.eclipse.jetty.util.log.Log class, following these
First from a Classpath Resource called
jetty-logging.properties (if found).
Then from the
Determine the log implementation.
defined, load the class it defines as the logger implementation
from the server classpath.
If the class
org.slf4j.Logger exists in server
classpath, the Jetty implementation becomes
If no logger implementation is specified, default to
If you select the default Jetty logger (StdErrLog), you can then use
further properties (either as system properties or in a
jetty-logging.properties as outlined in Selecting the Log Framework) to control event levels to log and to
adjust the format of those logs.
Sets the logging level for all loggers within the
name specified to the level, which can be (in
increasing order of restriction) ALL, DEBUG, INFO, WARN, OFF. The
name (or hierarchy) can be a specific fully qualified class or a
package namespace, for example,
-Dorg.eclipse.jetty.http.LEVEL=DEBUG is a package
namespace approach to turn all loggers in the Jetty HTTP package
to DEBUG level, and
on all logging events for the specific class, including DEBUG,
INFO, WARN (and even special internally ignored exception
classes). If more than one system property specifies a logging
level, the most specific one applies.
Named Logger specific, attempts to print the Java source file name and line number from where the logging event originated. Name must be a fully qualified class name (this configurabale does not support package name hierarchy). Default is false. Be aware that this is a slow operation and has an impact on performance.
Named Logger specific, controls the display of stacktraces. Name must be a fully qualified class name (this configurabale does not support package name hierarchy). Default is true.
Special Global Configuration. Attempts to print the Java source file name and line number from where the logging event originated. Default is false.
Special Global Configuration. When true, outputs logging events to STDERR using long form, fully qualified class names. When false, uses abbreviated package names. Default is false.
Formerly used to enable DEBUG level logging on any logger used within Jetty (not just Jetty's own logger).
Replaced with using the logger implementation specific configuration and level filtering.
Formerly used to enable DEBUG level logging on the internal Jetty StdErrLog implementation.
Ancient debugging flag that turned on all debugging, even non-logging debugging.
Jetty no longer uses because many third party libraries employ this overly simple property name, which would generate far too much console output.
This sets the Logging Implementation to StdErrLog.
Configures the logging level for
org.eclipse.jetty" to be
Configures the logging level for
org.eclipse.jetty.websocket" to be
This technique, from older versions of Jetty, configures all of the StdErrLog loggers (no other implementations support this) to be logging at DEBUG level.