FUSE Services Framework uses the Java logging utility, java.util.logging
. Logging is configured in a logging configuration file that is
written using the standard java.util.Properties
format. To run logging on an application, you can specify logging
programmatically or by defining a property at the command that points to the logging configuration file when you start the application.
FUSE Services Framework comes with a default logging.properties
file, which is located in your
InstallDir
/etc
directory. This file configures both the output destination for the log messages
and the message level that is published. The default configuration sets the loggers to print message flagged with the WARNING
level to
the console. You can either use the default file without changing any of the configuration settings or you can change the configuration settings to suit your
specific application.
FUSE Services Framework includes a logging feature that can be plugged into your client or your service to enable logging. Example 7.1 shows the configuration to enable the logging feature.
Example 7.1. Configuration for Enabling Logging
<jaxws:endpoint...> <jaxws:features> <bean class="org.apache.cxf.feature.LoggingFeature"/> </jaxws:features> </jaxws:endpoint>
For more information, see Logging Message Content.
To run a simple example of logging follow the instructions outlined in a Simple Example of Using Logging.
For more information on how logging works in FUSE Services Framework, read this entire chapter.
The java.util.logging
utility is one of the most widely used Java logging frameworks. There is a lot of information
available online that describes how to use and extend this framework. As a starting point, however, the following documents gives a good overview of
java.util.logging
: