How to debug

From BioWeka

Introduction

Most of the BioWeka classes provide a debugging capability. This functionality is offered through the Debugable interface that returns a Debugger object. The default debugger is the LogDebugger that uses the Java Logging API to log debug messages.

Application

The debugging is per default enabled, but only program failures and warnings are reported to the Standard Error Output. To change this behaviour the debug level property of the debugger must set to a value other than warnings, e.g. all. On the command line the debugger must be set as follows:

-D "bioweka.core.debuggers.LogDebugger -L ALL"
.

Remarks

Since the LogDebugger relies on Java Logging there are some important consequences:

  • If not configured otherwise all messages are logged to the Standard Error Output. However it is possible to configure additional or alternative logging sinks, e.g. a file, by supplying the appropriate command line arguments for the Java VM or by editing the logging.properties file in the jre/lib subdirectory of the Java installation directory.
  • Per default the logging sink for the Standard Error Output is configured in such a way that only information messages are displayed on the console - independant of what debug level is set. To change this behaviour the java.util.logging.ConsoleHandler.level property must be set to e.g. ALL.