To change the log level and output destination of the log messages in the wsdl_first sample application, complete the following steps:
Run the sample server as described in the Running the demo using java section of the
README.txt
file in the
directory. Note that the server start command specifies the defaultInstallDir
/samples/wsdl_firstlogging.properties
file, as follows:Platform Command Windows start java -Djava.util.logging.config.file=%CXF_HOME%\etc\logging.properties demo.hw.server.Server
UNIX java -Djava.util.logging.config.file=$CXF_HOME/etc/logging.properties demo.hw.server.Server &
The default
logging.properties
file is located in the
directory. It configures the Fuse Services Framework loggers to printInstallDir
/etcWARNING
level log messages to the console. As a result, you see very little printed to the console.Stop the server as described in the
README.txt
file.Make a copy of the default
logging.properties
file, name itmylogging.properties
file, and save it in the same directory as the defaultlogging.properties
file.Change the global logging level and the console logging levels in your
mylogging.properties
file toINFO
by editing the following lines of configuration:.level= INFO java.util.logging.ConsoleHandler.level = INFO
Restart the server using the following command:
Platform Command Windows start java -Djava.util.logging.config.file=%CXF_HOME%\etc\mylogging.properties demo.hw.server.Server
UNIX java -Djava.util.logging.config.file=$CXF_HOME/etc/mylogging.properties demo.hw.server.Server &
Because you configured the global logging and the console logger to log messages of level
INFO
, you see a lot more log messages printed to the console.