blob: e540fceab512d067d85b00a4c42518d3802d1a21 [file] [log] [blame]
<?xml version="1.0"?>
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to you under the Apache License, Version
2.0 (the "License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at Unless required by
applicable law or agreed to in writing, software distributed under the
License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied. See the License for
the specific language governing permissions and limitations under the
<title>Cache Event Logging</title>
<author email="">Aaron Smuts</author>
<section name="Cache Event Logging">
<p> 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.</p>
To inject a custom event logger, you simply need to implement the
interface and add a couple of lines to the cache.ccf file.
<p> 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:</p>
. . .
# jcs.auxiliary.RC.attributes.RemoteServiceName=RemoteCache
# -1 means no timeout, this is the default
# if the timeout is -1, no threadpool will be used.
. . .
<p> The attribute "logCateoryName" is a property of this
implementation. You can configure any properties on your
implementation in the same way.</p>