Package org.apache.zookeeper.audit
Class ZKAuditProvider
- java.lang.Object
-
- org.apache.zookeeper.audit.ZKAuditProvider
-
public class ZKAuditProvider extends Object
-
-
Constructor Summary
Constructors Constructor Description ZKAuditProvider()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method 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)
-
-
-
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.
-
-