Class LogFunctions

java.lang.Object
flexagon.fd.services.groovy.functions.BaseFunctions
flexagon.fd.services.groovy.functions.LogFunctions
Direct Known Subclasses:
WebhookLogFunctions

public class LogFunctions extends BaseFunctions
Log Functions for logging messages and capturing status messages
Since:
5.3
  • Field Details

  • Constructor Details

    • LogFunctions

      public LogFunctions()
  • Method Details

    • setObjectId

      public void setObjectId(Long pObjectId)
    • getObjectId

      public Long getObjectId()
    • setParentObjectId

      public void setParentObjectId(Long pParentObjectId)
    • getParentObjectId

      public Long getParentObjectId()
    • setObjectType

      public void setObjectType(FlexDeploySecurityConstants.SecurityObjectType pObjectType)
    • getObjectType

      public FlexDeploySecurityConstants.SecurityObjectType getObjectType()
    • setMessage

      public void setMessage(String pMessage)
      Sets the message shown for current webhook execution on the Webhook Messages screen. Message will be overwritten if there are any errors during execution. Using this function will also write an info level log
      Parameters:
      pMessage - Message to set. e.g. "Branch abc created" or "Projects 1 and 2 built"
    • setMessage

      public void setMessage(String pMessage, boolean overwrite)
      Sets the message shown for current webhook execution on the Webhook Messages screen. Message will be overwritten if there are any errors during execution. This overload accepts an additional argument to overwrite the previous message (if any).
      Parameters:
      pMessage - Message to set. e.g. "Branch abc created" or "Projects 1 and 2 built"
      overwrite - If a message is already set, should it be overwritten with this message
      Since:
      5.5.0.2
    • info

      public void info(String pMessage)
      Logs a message to the FlexDeploy logs with a level of INFO. These logs will be added to the FlexDeploy logs in addition to the Webhook log table shown in Webhook Messages
      Parameters:
      pMessage - The message to log
    • info

      public void info(String pMessage, Throwable pThrowable)
      Logs a message to the FlexDeploy logs with a level of INFO. These logs will be added to the FlexDeploy logs in addition to the Webhook log table shown in Webhook Messages
      Parameters:
      pMessage - The message to log
      pThrowable - Throwable error to log
    • fine

      public void fine(String pMessage)
      Logs a message to the FlexDeploy logs with a level of FINE. These logs will be added to the FlexDeploy logs in addition to the Webhook log table shown in Webhook Messages
      Parameters:
      pMessage - The message to log
    • fine

      public void fine(String pMessage, Throwable pThrowable)
      Logs a message to the FlexDeploy logs with a level of FINE. These logs will be added to the FlexDeploy logs in addition to the Webhook log table shown in Webhook Messages
      Parameters:
      pMessage - The message to log
      pThrowable - Throwable error to log
    • warning

      public void warning(String pMessage)
      Logs a message to the FlexDeploy logs with a level of WARNING. These logs will be added to the FlexDeploy logs in addition to the Webhook log table shown in Webhook Messages
      Parameters:
      pMessage - The message to log
    • warning

      public void warning(String pMessage, Throwable pThrowable)
      Logs a message to the FlexDeploy logs with a level of WARNING. These logs will be added to the FlexDeploy logs in addition to the Webhook log table shown in Webhook Messages
      Parameters:
      pMessage - The message to log
      pThrowable - Throwable error to log
    • severe

      public void severe(String pMessage)
      Logs a message to the FlexDeploy logs with a level of SEVERE. These logs will be added to the FlexDeploy logs in addition to the Webhook log table shown in Webhook Messages
      Parameters:
      pMessage - The message to log
    • severe

      public void severe(String pMessage, Throwable pThrowable)
      Logs a message to the FlexDeploy logs with a level of SEVERE. These logs will be added to the FlexDeploy logs in addition to the Webhook log table shown in Webhook Messages
      Parameters:
      pMessage - The message to log
      pThrowable - Throwable error to log
    • getLogs

      public List<LogMessage> getLogs()
    • getMessage

      public String getMessage()
    • sanitizeMessage

      public String sanitizeMessage(String pMessage)
    • getSecureLogValues

      public List<String> getSecureLogValues()
    • getGroovyKey

      public String getGroovyKey()
      Specified by:
      getGroovyKey in class BaseFunctions
    • setLogKey

      public void setLogKey(String pLogKey)
    • setSecureLogValues

      public void setSecureLogValues(List<String> pSecureValues)
    • addSecureLogValues

      public void addSecureLogValues(String pSecureValue)
    • cleanup

      public void cleanup()
      Specified by:
      cleanup in class BaseFunctions
    • addSecureLogValues

      public void addSecureLogValues(Map<String,Serializable> pProperties)