AuditHelper (Apache ZooKeeper - Server 3.7.0 API)
Date: 2021-03-17

org.apache.zookeeper.audit

## Class AuditHelper

- java.lang.Object
- - org.apache.zookeeper.audit.AuditHelper

-     public final class AuditHelper
      extends Object

  Helper class to decouple audit log code.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AuditHelper()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `addAuditLog(Request request, DataTree.ProcessTxnResult rc)`
    `static void` | `addAuditLog(Request request, DataTree.ProcessTxnResult txnResult, boolean failedTxn)` Add audit log if audit log is enabled and operation is of type which to be audit logged.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### AuditHelper

          public AuditHelper()

  - ### Method Detail

    - #### addAuditLog

          public static void addAuditLog(Request request,
                                         DataTree.ProcessTxnResult rc)

    - #### addAuditLog

          public static void addAuditLog(Request request,
                                         DataTree.ProcessTxnResult txnResult,
                                         boolean failedTxn)

      Add audit log if audit log is enabled and operation is of type which to be audit logged.
      Parameters:
        `request` - user request
        `txnResult` - ProcessTxnResult
        `failedTxn` - whether audit is being done failed transaction for normal transaction

Copyright © 2008–2021 The Apache Software Foundation. All rights reserved.