Package io.jenkins.plugins.auditlogger
Class AuditLogEntry
java.lang.Object
io.jenkins.plugins.auditlogger.AuditLogEntry
- All Implemented Interfaces:
Serializable
Immutable-after-construction audit log entry capturing Jenkins events with full context.
Thread-safe: uses DateTimeFormatter (vs SimpleDateFormat which is NOT thread-safe).
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionAuditLogEntry(String username, String action, String target, String details) -
Method Summary
Modifier and TypeMethodDescriptionISO-8601 UTC timestamp.Human-readable UTC timestamp.getReadableTimestamp(ZoneId zoneId) Human-readable timestamp for a configured display timezone.longvoidsetAuthMethod(String authMethod) voidsetDetails(String details) voidsetSessionId(String sessionId) voidsetSeverity(String severity) voidsetSourceIp(String sourceIp) voidsetTriggerType(String triggerType) voidsetUserAgent(String userAgent) toString()static AuditLogEntrywithAuth(String username, String action, String target, String details, String sourceIp, String authMethod) Factory with explicit IP and auth method (for security listener).static AuditLogEntryFactory for build events with trigger information.
-
Constructor Details
-
AuditLogEntry
-
-
Method Details
-
withAuth
public static AuditLogEntry withAuth(String username, String action, String target, String details, String sourceIp, String authMethod) Factory with explicit IP and auth method (for security listener). -
withTrigger
public static AuditLogEntry withTrigger(String username, String action, String target, String details, String triggerType) Factory for build events with trigger information. -
getTimestamp
public long getTimestamp() -
getUsername
-
getAction
-
getTarget
-
getDetails
-
getSourceIp
-
getAuthMethod
-
getTriggerType
-
getSessionId
-
getUserAgent
-
getSeverity
-
setSourceIp
-
setAuthMethod
-
setTriggerType
-
setSessionId
-
setUserAgent
-
setSeverity
-
setDetails
-
getFormattedTimestamp
ISO-8601 UTC timestamp. Thread-safe (DateTimeFormatter). -
getReadableTimestamp
Human-readable UTC timestamp. Thread-safe. -
getReadableTimestamp
Human-readable timestamp for a configured display timezone. -
toString
-