Child pages
  • QuickFIXJ Logging

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0

...

  • There is a Log instance per FIX session, and <em>only</em> session-specific logs
  • The Log abstraction does not support levels or priorities on the log messages.</li>
  • The default Log implementations are not as flexible as Log4J  or the JDK 1.4 logger

The session-oriented Log means that there is no defined way to log information not associated with a session. Some QuickFIX users have recommended having a global log that's not session-specific but this would not be compatible with existing Log
implementations without some signficant hacks. For example, we could define a pseudo-session identifier and use that for global logging. This seems like a bit of a hack to me.

QuickFIX/J uses the SLF4J log implementation wrapper for logging information not directly related to FIX sessions. This allows Log4J, the JDK 1.4 logger or other logging implementations supported by SLF4J to be used (including a bridge to Jakarta Commons Logging). There is also a QuickFIX/J SLF4J log factory implementation that can be used (with Log4J, for example) to unify logging for both the session and non-session code. For example, you can use Log4J appenders to route logged session events and non-session log information to one file and messages to a database. You could also tell Log4J to route logged event with a priority level above a defined level ("WARN", for example) to a remote socket or a Java Messaging Service queue where the information could be displayed on an operations console or processed by a log aggregator. You could also implement your own custom logging behavior as a plugin to a framework like Log4J. See the description of Log4J appenders for more information on this possibility. These types of advanced logging behaviors are not supported by the default QuickFIX log factory implementations. This was the reason for my comment about flexibility. My recommendation is to use the SLF4J log factory with your favorite logging implementation instead of using the legacy QuickFIX log factory implementations.

...