public class Slf4jAuditService extends Object implements AuditService
| Constructor and Description |
|---|
Slf4jAuditService(com.fasterxml.jackson.databind.ObjectMapper mapper) |
| Modifier and Type | Method and Description |
|---|---|
void |
audit(String user,
String action,
String message,
Object params)
Log the audit message.
|
boolean |
isLogging()
Checks if is audit service is logging.
|
public Slf4jAuditService(com.fasterxml.jackson.databind.ObjectMapper mapper)
public void audit(String user, String action, String message, Object params)
AuditServiceaudit in interface AuditServiceuser - the user (may be null if non-auth)action - an action represneting the action which is being performmessage - the descriptive message (or null)params - the params any parameters (typically variables passed, or response codes)public boolean isLogging()
AuditServiceIf not then audit() will not be called (and other work will not be done).
Most implementation will have this fixed (to true), but it is called each time an audit message may be generated, so it can change dynamically.
isLogging in interface AuditServiceCopyright © 2017–2018 Committed. All rights reserved.