Class AccessLogger

java.lang.Object
org.apache.sling.jcr.resource.internal.helper.AccessLogger
All Implemented Interfaces:
Closeable, AutoCloseable

public class AccessLogger extends Object implements Closeable
Helper class to report on repository access. The focus is to have a less overhead as possible if it is not used; in case it is enabled and access is logged, the performance overhead does not matter. In the current implementation it has 2 features: * Write a stacktrace on every recorded operation; this comes with a massive overhead and it is definitely not recommended to turn this on on production, since it can easily create 100s of megabytes of log and will slow down processing massively. To use this turn on TRACE logging on 'org.apache.sling.jcr.resource.AccessLogger.operation' * When a resource resolver is closed, dump a single log statement about the number of recorded operations. The overhead is very small and it can be turned on for a longer period of time also in production. To use it enable DEBUG logging on 'org.apache.sling.jcr.resource.AccessLogger.statistics'.