Class AuditLogEntry

java.lang.Object
io.jenkins.plugins.auditlogger.AuditLogEntry
All Implemented Interfaces:
Serializable

public class AuditLogEntry extends Object implements 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 Details

  • 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

      public String getUsername()
    • getAction

      public String getAction()
    • getTarget

      public String getTarget()
    • getDetails

      public String getDetails()
    • getSourceIp

      public String getSourceIp()
    • getAuthMethod

      public String getAuthMethod()
    • getTriggerType

      public String getTriggerType()
    • getSessionId

      public String getSessionId()
    • getUserAgent

      public String getUserAgent()
    • getSeverity

      public String getSeverity()
    • setSourceIp

      public void setSourceIp(String sourceIp)
    • setAuthMethod

      public void setAuthMethod(String authMethod)
    • setTriggerType

      public void setTriggerType(String triggerType)
    • setSessionId

      public void setSessionId(String sessionId)
    • setUserAgent

      public void setUserAgent(String userAgent)
    • setSeverity

      public void setSeverity(String severity)
    • setDetails

      public void setDetails(String details)
    • getFormattedTimestamp

      public String getFormattedTimestamp()
      ISO-8601 UTC timestamp. Thread-safe (DateTimeFormatter).
    • getReadableTimestamp

      public String getReadableTimestamp()
      Human-readable UTC timestamp. Thread-safe.
    • getReadableTimestamp

      public String getReadableTimestamp(ZoneId zoneId)
      Human-readable timestamp for a configured display timezone.
    • toString

      public String toString()
      Overrides:
      toString in class Object