# 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
Description
`AuditHelper()`

## Method Summary

Modifier and Type
Method
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 Object

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

## Constructor Details

### AuditHelper

public AuditHelper()

## Method Details

### 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