Configure The Logging Framework [LogViewer - Getting Started]

[DOCUMENT IS UNDER CONSTRUCTION, don't bother, with a little guessing it will work right now and it will also be finished soon]

All logging framework don't produce XML output or even send it to a socket in their base configuration, so you have to tell them to do so.

Java Util Logging Framework

In order to configure Java Util Logging to work with EDevTools LogViewer you have to create or modify your logging.properties file that you provide on the commandline to your JVM running the logged apllication. Or you have to programmatically set the configuration.

Configuration via logging.properties

If you don't have a logging.properties (the file name only stands symbolic for the configuration file, the real file name is free to choose) create one now. If you have one, you have to merge the following lines appropiately into your file.

For receiving on a socket:

handlers=java.util.logging.SocketHandler
java.util.logging.SocketHandler.level=ALL
java.util.logging.SocketHandler.host=localhost
#the port number is the one you choosed in the set source wizard, 8888 is default
java.util.logging.SocketHandler.port=8888
java.util.logging.SocketHandler.formatter = java.util.logging.XMLFormatter

For reading an file:

handlers=java.util.logging.FileHandler
java.util.logging.FileHandler.level = ALL
java.util.logging.FileHandler.encoding = UTF-8
# replace in the following line the text after the equal sign with your log file destination
java.util.logging.FileHandler.pattern = d:\\tmp\\log\\atosj_%u.log.xml
java.util.logging.FileHandler.limit = 0
java.util.logging.FileHandler.count = 0
java.util.logging.FileHandler.formatter = java.util.logging.XMLFormatter

Start The Log Reader

 

Start Your Application

Now it's time to start your application for producing the log. You can start your application with the Eclipse Run or ordinary via calling java via the commandline.

with -Djava.util.logging.config.file=<path-to>/logging.properties . For more information on providing settings to Java Util Logging see [TODO: URL].