Class SecurityLoggerImpl

java.lang.Object
ddf.security.audit.impl.SecurityLoggerImpl
All Implemented Interfaces:
ddf.security.audit.SecurityLogger

public final class SecurityLoggerImpl extends Object implements ddf.security.audit.SecurityLogger
Class that contains utility methods for logging common security messages.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    SecurityLoggerImpl(ddf.security.SubjectOperations subjectOperations)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    audit(String message)
    Logs a message object with the INFO level.
    void
    audit(String message, Object... params)
    Logs a message with parameters at the INFO level.
    void
    audit(String message, Throwable t)
    Logs a message at the INFO level including the stack trace of the Throwable t passed as parameter.
    void
    audit(String message, org.apache.logging.log4j.util.Supplier... paramSuppliers)
    Logs a message with parameters which are only to be constructed if the logging level is the INFO level.
    void
    audit(String message, org.apache.shiro.subject.Subject subject)
    Logs a message object with the INFO level.
    void
    audit(String message, org.apache.shiro.subject.Subject subject, Object... params)
    Logs a message with parameters at the INFO level.
    void
    audit(String message, org.apache.shiro.subject.Subject subject, Throwable t)
    Logs a message at the INFO level including the stack trace of the Throwable t passed as parameter.
    void
    audit(String message, org.apache.shiro.subject.Subject subject, org.apache.logging.log4j.util.Supplier... paramSuppliers)
    Logs a message with parameters which are only to be constructed if the logging level is the INFO level.
    void
    auditWarn(String message)
    Logs a message object with the WARN level.
    void
    auditWarn(String message, Object... params)
    Logs a message with parameters at the WARN level.
    void
    auditWarn(String message, Throwable t)
    Logs a message at the WARN level including the stack trace of the Throwable t passed as parameter.
    void
    auditWarn(String message, org.apache.logging.log4j.util.Supplier... paramSuppliers)
    Logs a message with parameters which are only to be constructed if the logging level is the WARN level.
    void
    auditWarn(String message, org.apache.shiro.subject.Subject subject)
    Logs a message object with the WARN level.
    void
    auditWarn(String message, org.apache.shiro.subject.Subject subject, Object... params)
    Logs a message with parameters at the WARN level.
    void
    auditWarn(String message, org.apache.shiro.subject.Subject subject, Throwable t)
    Logs a message at the WARN level including the stack trace of the Throwable t passed as parameter.
    void
    auditWarn(String message, org.apache.shiro.subject.Subject subject, org.apache.logging.log4j.util.Supplier... paramSuppliers)
    Logs a message with parameters which are only to be constructed if the logging level is the WARN level.
    void
    setAuditPropertiesPlugins(List<ddf.security.audit.AuditPropertiesPlugin> auditPropertiesPlugins)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • SecurityLoggerImpl

      public SecurityLoggerImpl(ddf.security.SubjectOperations subjectOperations)
  • Method Details

    • setAuditPropertiesPlugins

      public void setAuditPropertiesPlugins(List<ddf.security.audit.AuditPropertiesPlugin> auditPropertiesPlugins)
    • audit

      public void audit(String message, org.apache.shiro.subject.Subject subject)
      Logs a message object with the INFO level.
      Specified by:
      audit in interface ddf.security.audit.SecurityLogger
      Parameters:
      message - the message string to log.
      subject - the user subject to log
    • audit

      public void audit(String message)
      Logs a message object with the INFO level.
      Specified by:
      audit in interface ddf.security.audit.SecurityLogger
      Parameters:
      message - the message string to log.
    • audit

      public void audit(String message, org.apache.shiro.subject.Subject subject, Object... params)
      Logs a message with parameters at the INFO level.
      Specified by:
      audit in interface ddf.security.audit.SecurityLogger
      Parameters:
      message - the message to log; the format depends on the message factory.
      subject - the user subject to log
      params - parameters to the message.
    • audit

      public void audit(String message, Object... params)
      Logs a message with parameters at the INFO level.
      Specified by:
      audit in interface ddf.security.audit.SecurityLogger
      Parameters:
      message - the message to log; the format depends on the message factory.
      params - parameters to the message.
    • audit

      public void audit(String message, org.apache.shiro.subject.Subject subject, org.apache.logging.log4j.util.Supplier... paramSuppliers)
      Logs a message with parameters which are only to be constructed if the logging level is the INFO level.
      Specified by:
      audit in interface ddf.security.audit.SecurityLogger
      Parameters:
      message - the message to log; the format depends on the message factory.
      subject - the user subject to log
      paramSuppliers - An array of functions, which when called, produce the desired log message parameters.
    • audit

      public void audit(String message, org.apache.logging.log4j.util.Supplier... paramSuppliers)
      Logs a message with parameters which are only to be constructed if the logging level is the INFO level.
      Specified by:
      audit in interface ddf.security.audit.SecurityLogger
      Parameters:
      message - the message to log; the format depends on the message factory.
      paramSuppliers - An array of functions, which when called, produce the desired log message parameters.
    • audit

      public void audit(String message, org.apache.shiro.subject.Subject subject, Throwable t)
      Logs a message at the INFO level including the stack trace of the Throwable t passed as parameter.
      Specified by:
      audit in interface ddf.security.audit.SecurityLogger
      Parameters:
      message - the message object to log.
      subject - the user subject to log
      t - the exception to log, including its stack trace.
    • audit

      public void audit(String message, Throwable t)
      Logs a message at the INFO level including the stack trace of the Throwable t passed as parameter.
      Specified by:
      audit in interface ddf.security.audit.SecurityLogger
      Parameters:
      message - the message object to log.
      t - the exception to log, including its stack trace.
    • auditWarn

      public void auditWarn(String message, org.apache.shiro.subject.Subject subject)
      Logs a message object with the WARN level.
      Specified by:
      auditWarn in interface ddf.security.audit.SecurityLogger
      Parameters:
      message - the message string to log.
      subject - the user subject to log
    • auditWarn

      public void auditWarn(String message)
      Logs a message object with the WARN level.
      Specified by:
      auditWarn in interface ddf.security.audit.SecurityLogger
      Parameters:
      message - the message string to log.
    • auditWarn

      public void auditWarn(String message, org.apache.shiro.subject.Subject subject, Object... params)
      Logs a message with parameters at the WARN level.
      Specified by:
      auditWarn in interface ddf.security.audit.SecurityLogger
      Parameters:
      message - the message to log; the format depends on the message factory.
      subject - the user subject to log
      params - parameters to the message.
    • auditWarn

      public void auditWarn(String message, Object... params)
      Logs a message with parameters at the WARN level.
      Specified by:
      auditWarn in interface ddf.security.audit.SecurityLogger
      Parameters:
      message - the message to log; the format depends on the message factory.
      params - parameters to the message.
    • auditWarn

      public void auditWarn(String message, org.apache.shiro.subject.Subject subject, org.apache.logging.log4j.util.Supplier... paramSuppliers)
      Logs a message with parameters which are only to be constructed if the logging level is the WARN level.
      Specified by:
      auditWarn in interface ddf.security.audit.SecurityLogger
      Parameters:
      message - the message to log; the format depends on the message factory.
      subject - the user subject to log
      paramSuppliers - An array of functions, which when called, produce the desired log message parameters.
    • auditWarn

      public void auditWarn(String message, org.apache.logging.log4j.util.Supplier... paramSuppliers)
      Logs a message with parameters which are only to be constructed if the logging level is the WARN level.
      Specified by:
      auditWarn in interface ddf.security.audit.SecurityLogger
      Parameters:
      message - the message to log; the format depends on the message factory.
      paramSuppliers - An array of functions, which when called, produce the desired log message parameters.
    • auditWarn

      public void auditWarn(String message, org.apache.shiro.subject.Subject subject, Throwable t)
      Logs a message at the WARN level including the stack trace of the Throwable t passed as parameter.
      Specified by:
      auditWarn in interface ddf.security.audit.SecurityLogger
      Parameters:
      message - the message object to log.
      subject - the user subject to log
      t - the exception to log, including its stack trace.
    • auditWarn

      public void auditWarn(String message, Throwable t)
      Logs a message at the WARN level including the stack trace of the Throwable t passed as parameter.
      Specified by:
      auditWarn in interface ddf.security.audit.SecurityLogger
      Parameters:
      message - the message object to log.
      t - the exception to log, including its stack trace.