Logging

The API uses the same plugable logging system as the Kx Stream API ( DeltaApiCore ). The logging system is compatible with popular Java logging frameworks such as log4j java.util.logging and logback. Loggers are registered with the API via the Service class.

All core logging is based on the client choice of logger. In this example the Log4J library is used.

The Demo app includes an example of a log4j.xml configuration in the /src/test/resources folder. The slf4j binds to the log4j framework via the POM file:

<dependency>
  <groupId>org.slf4j</groupId>
  <artifactId>slf4j-log4j12</artifactId>
  <version>1.7.25</version>
  <scope>test</scope>
</dependency>

LogJnet is based on the idea of log levels:

  • ALL
  • TRACE (only supported here though extension methods)
  • DEBUG
  • INFO
  • WARN
  • ERROR
  • FATAL
  • OFF

In practice, the only log levels in use here are: TRACE , DEBUG , INFO , WARN , ERROR (in order of increasing priority).

Other loggers can be implemented by the user as the system is using a generic plugable logger.

The API logging system requires that the user's logger is derived from the System.Diagnostics.TraceListener class. The user may need to wrap their logger if this is not the case.