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

org.apache.zookeeper.audit

## Class ZKAuditProvider

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

-     public class ZKAuditProvider
      extends Object

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ZKAuditProvider()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `addServerStartFailureAuditLog()` Add audit log for server start fail.
    `static void` | `addZKStartStopAuditLog()` Add audit log for server start and register server stop log.
    `static String` | `getZKUser()` User who has started the ZooKeeper server user, it will be the logged-in user.
    `static boolean` | `isAuditEnabled()`
    `static void` | `log(String user, String operation, String znode, String acl, String createMode, String session, String ip, AuditEvent.Result result)`

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

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

- - ### Constructor Detail

    - #### ZKAuditProvider

          public ZKAuditProvider()

  - ### Method Detail

    - #### isAuditEnabled

          public static boolean isAuditEnabled()

      Returns:
        true if audit log is enabled

    - #### log

          public static void log(String user,
                                 String operation,
                                 String znode,
                                 String acl,
                                 String createMode,
                                 String session,
                                 String ip,
                                 AuditEvent.Result result)

    - #### addZKStartStopAuditLog

          public static void addZKStartStopAuditLog()

      Add audit log for server start and register server stop log.

    - #### addServerStartFailureAuditLog

          public static void addServerStartFailureAuditLog()

      Add audit log for server start fail.

    - #### getZKUser

          public static String getZKUser()

      User who has started the ZooKeeper server user, it will be the logged-in user. If no user logged-in then system user.

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