public interface AuditLogService
| Modifier and Type | Interface and Description |
|---|---|
static interface |
AuditLogService.FieldChange
Simple interface that provides information about a changed field.
|
| Modifier and Type | Method and Description |
|---|---|
List<AuditLogEntry> |
getAgentAuditLogsMessagesByAgentName(String agentName)
Provide a list of audit log messages filter by Agent Name
|
List<AuditLogEntry> |
getAuditLogMessagesForPlan(ImmutablePlan plan)
Provide a list of all audit log messages written against a plan.
|
List<AuditLogEntry> |
getAuditLogMessagesForPlan(ImmutablePlan plan,
long startDate,
long endDate)
Provide a list of all audit log messages written against a plan between input dates.
|
List<AuditLogEntry> |
getGlobalAuditLogMessages()
Provide a list of all audit log messages written against the system.
|
boolean |
hasAuditLogMessagesForPlan(ImmutablePlan plan,
long startDate,
long endDate)
Determine whether any log messages have been recorded against the specified plan between the
startDate and endDate (inclusive).
|
boolean |
isEnabled()
Returns whether logging is enabled
|
void |
log(AuditLogEntry msg)
Add a log to the audit log.
|
void |
log(Collection<AuditLogService.FieldChange> changes,
Key plan)
Add 'field change' messages to the system audit log.
|
void |
log(Iterable<AuditLogService.FieldChange> changes,
AuditLogEntity entity)
Add 'field change' messages to the system audit log.
|
void |
log(String msg)
Add a message to the system audit log.
|
void |
log(String msg,
Key plan)
Add a message to the plans audit log.
|
void |
log(String s,
Key planKey,
AuditLogEntity entity)
Add a message to the plans audit log.
|
void |
log(String fieldName,
String oldValue,
String newValue,
Key plan)
Add 'field change' message to the system audit log.
|
void |
log(String fieldName,
String oldValue,
String newValue,
Key planKey,
AuditLogEntity entity)
Add 'field change' message to the system audit log.
|
void |
log(com.atlassian.user.User user,
String msg)
Add a message to the system audit log.
|
void |
log(com.atlassian.user.User user,
String msg,
Key plan)
Add a message to the plans audit log.
|
void |
log(com.atlassian.user.User user,
String msg,
Key planKey,
AuditLogEntity entity)
Add a message to the plans audit log.
|
void |
removeAllAuditLogMessages()
Deletes all log messages in the database
|
void |
removeAuditLogMessagesForPlan(ImmutablePlan plan)
Deletes all log messages for a given plan
|
void |
removeGlobalAuditLogMessages()
Deletes all Global audit log messages
|
void |
setEnabled(boolean enabled)
sets whether logging is enabled or not
|
void log(@NotNull
AuditLogEntry msg)
msg - (fully populated) to be loggedvoid log(@NotNull
String msg)
msg - the text of the message to add.void log(@NotNull
Collection<AuditLogService.FieldChange> changes,
@Nullable
Key plan)
void log(@NotNull
Iterable<AuditLogService.FieldChange> changes,
@Nullable
AuditLogEntity entity)
void log(@NotNull
String fieldName,
@Nullable
String oldValue,
@Nullable
String newValue,
@Nullable
Key plan)
void log(@NotNull
String fieldName,
@Nullable
String oldValue,
@Nullable
String newValue,
@Nullable
Key planKey,
@Nullable
AuditLogEntity entity)
entity - job's task or chain's stage affected by the changevoid log(@Nullable
com.atlassian.user.User user,
@NotNull
String msg)
user - who caused the event being loggedmsg - the text of the message to add.void log(@NotNull
String msg,
@Nullable
Key plan)
msg - to logplan - to log it againstvoid log(@NotNull
String s,
@Nullable
Key planKey,
@Nullable
AuditLogEntity entity)
s - to logplanKey - to log it againstentity - job's task, chain' stage etc. to log againstvoid log(@Nullable
com.atlassian.user.User user,
@NotNull
String msg,
@Nullable
Key plan)
user - who caused the event being loggedmsg - to be loggedplan - to log the message against.void log(@Nullable
com.atlassian.user.User user,
@NotNull
String msg,
@Nullable
Key planKey,
@Nullable
AuditLogEntity entity)
user - who caused the event being loggedmsg - to be loggedplanKey - to log the message against.entity - header of job's task, chain' stage etc. to log againstList<AuditLogEntry> getAuditLogMessagesForPlan(@NotNull ImmutablePlan plan)
plan - to find audit messages forList<AuditLogEntry> getAuditLogMessagesForPlan(@NotNull ImmutablePlan plan, long startDate, long endDate)
plan - to find audit messages forstartDate - if specified, messages before this date will be excluded. Represented as milliseconds
after January 1, 1970 00:00:00 GMT. Passing 0 or a negative number will not set a start range.endDate - if specified, messages after this date will be excluded. Represented as milliseconds
after January 1, 1970 00:00:00 GMT. Passing 0 or a negative number will not set an end range.List<AuditLogEntry> getAgentAuditLogsMessagesByAgentName(String agentName)
agentName - the name of the agentList<AuditLogEntry> getGlobalAuditLogMessages()
void removeGlobalAuditLogMessages()
boolean hasAuditLogMessagesForPlan(@NotNull
ImmutablePlan plan,
long startDate,
long endDate)
getAuditLogMessagesForPlan(ImmutablePlan, long, long).startDate - if specified, messages before this date will be excluded. Represented as milliseconds
after January 1, 1970 00:00:00 GMT. Passing 0 or a negative number will not set a start range.endDate - if specified, messages after this date will be excluded. Represented as milliseconds
after January 1, 1970 00:00:00 GMT. Passing 0 or a negative number will not set an end range.void removeAuditLogMessagesForPlan(@NotNull
ImmutablePlan plan)
plan - to delete messages forvoid removeAllAuditLogMessages()
boolean isEnabled()
void setEnabled(boolean enabled)
Copyright © 2017 Atlassian Software Systems Pty Ltd. All rights reserved.