Cache Event Logging

JCS allows you to implement custom event loggers. Most of the auxiliaries will log ICacheEvents (eg. update, get, getMultiple, remove, removeAll, and dispose) to an injected event logger. By default the log calls balk. But if you inject a logger, you can add monitoring to any auxiliary. Most auxiliaries also log key application events and critical errors to the same logger.

To inject a custom event logger, you simply need to implement the org.apache.jcs.engine.logging.behavior.ICacheEventLogger interface and add a couple of lines to the cache.ccf file.

During configuration, JCS will look for event loggers configured for each auxiliary. JCS will set any custom properties. For instance, to add debug event logging to a remote cache client, you could do the following:

The attribute "logCateoryName" is a property of this implementation. You can configure any properties on your implementation in the same way.