Logging provides a possibility to examine what the application is doing internally. This is primarily intended to be used for troubleshooting purposes. It requires a logging framework to be enabled to be operative.
By contrast, the configuration items verbose and debug can also be used to get some information about the running application, but these work without logging framework. The information provided by these two options however, is much more sparse and in the case of the verbose option intended for normal operation, not just troubleshooting.
Logging on the other hand provides a way to enable diagnostic output in a lot of places in the running code and allows to configure which of these messages should be displayed on a fine grained level of detail. The exact nature of what can be configured and the format of the configuration file is determined by the logging framework in use. For the specification of the format of these configuration files please refer to the documentation of the corresponding logging framework.
These are the possible options for the logging framework to be used:
Apache Log4j
Provides the most flexible way to configure logging in terms of a
hierarchical logger model and a wide variety of output appenders.
Requires the optional library ${app.home}/lib/log4j.jar
to be available.
Used by default if it can be found in the application classpath.
Single Log
The standard fallback logging mechanism if Log4j cannot be used. Simply outputs all messages to the console.
Can be explicitly enabled by specifying
-Dnet.boarderzone.util.LoggerFactory=single
or
-Dnet.boarderzone.util.LoggerFactory=net.boarderzone.util.LoggerFactorySingle
on the command line when starting the application (as a JVM parameter, not
an application parameter!).
JDK Logging
Provides functionality similar to Log4j but not all features are properly supported, as it isn't designed to be reconfigured as dynamically as the application requires it.
Must be explicitly enabled by specifying
-Dnet.boarderzone.util.LoggerFactory=jdk
or
-Dnet.boarderzone.util.LoggerFactory=net.boarderzone.util.LoggerFactoryJdk
on the command line when starting the application (as a JVM parameter, not
an application parameter!).
Simple console logging
Provides just simple output to the console which started the application. Supports a hierarchical logger configuration similar to Log4j but no sophisticated output appenders etc.
Must be explicitly enabled by specifying
-Dnet.boarderzone.util.LoggerFactory=console
or
-Dnet.boarderzone.util.LoggerFactory=net.boarderzone.util.LoggerFactoryConsole
on the command line when starting the application (as a JVM parameter, not
an application parameter!).
no logging at all
Disables all logging behavior of the application.
Will be 'used' if no other logging framework is available.
The standard hardwired logging configuration will suppress all diagnostic output and just display warning and error messages to the console which started the application. Thus when starting the application in a windowing environment which doesn't provide a console, no output will ever be visible.
To change this behavior, a logging configuration file can be specified with the
logging configuration item which by default specifies the
file logging.properties
in the current directory from which
the application is being started. If such a file is found, it will be loaded and
used to configure the logging framework in use. From that moment on, the logging
messages should appear in the configured output appenders (console, log file, etc.).