Class GroovyLogger

java.lang.Object
com.imc.iss.groovy.GroovyLogger

public class GroovyLogger extends Object
This class allows logging and sending notifications from within the groovy script.

This class is automatically provided inside all scripts and can be accessed as a variable named groovyLogger

Note that for a log of a particular level to be written, the corresponding log level for this class has to be set. This can be done through the HANA cockpit.

  • Method Details

    • error

      public void error(String msg) throws IMCGroovyException
      Throws an error and stops the script execution immediately.

      Any subsequent handling by the system that are normally done after the script completes will be stopped as well.

      This will automatically logs the message at the ERROR level, as well as send out an error notification.

      Parameters:
      msg - The message string to be logged and sent
      Throws:
      IMCGroovyException - The custom exception that will be thrown
    • isDebugEnabled

      public boolean isDebugEnabled()
      Check debug log is enabled
      Returns:
      status as boolean
    • isInfoEnabled

      public boolean isInfoEnabled()
      Check info log is enabled
      Returns:
      status as boolean
    • isTraceEnabled

      public boolean isTraceEnabled()
      Check info log is enabled
      Returns:
      status as boolean
    • logDebug

      public void logDebug(String msg)
      Log a message at the DEBUG level
      Parameters:
      msg - The message string to be logged
    • logDebug

      public void logDebug(String format, Object... arguments)
      Log a message at the DEBUG level
      Parameters:
      format - The format string to be logged
      arguments -
    • logError

      public void logError(String msg)
      Log a message at the ERROR level
      Parameters:
      msg - The message string to be logged
    • logError

      public void logError(String format, Object... arguments)
      Log a message at the ERROR level
      Parameters:
      format - The format string to be logged
      arguments -
    • logInfo

      public void logInfo(String msg)
      Log a message at the INFO level
      Parameters:
      msg - The message string to be logged
    • logInfo

      public void logInfo(String format, Object... arguments)
      Log a message at the INFO level
      Parameters:
      format - The format string to be logged
      arguments -
    • logTrace

      public void logTrace(String msg)
      Log a message at the TRACE level
      Parameters:
      msg - The message string to be logged
    • logTrace

      public void logTrace(String format, Object... arguments)
      Log a message at the TRACE level
      Parameters:
      format - The format string to be logged
      arguments -
    • logWarning

      public void logWarning(String msg)
      Log a message at the WARN level
      Parameters:
      msg - The message string to be logged
    • logWarning

      public void logWarning(String format, Object... arguments)
      Log a message at the WARN level
      Parameters:
      format - The format string to be logged
      arguments -
    • notifyError

      public void notifyError(String msg)
      Send a error notification to the UI
      Parameters:
      msg - The message string to be sent
    • notifyError

      public void notifyError(String msg, String parameters)
      Send a error notification to the UI
      Parameters:
      msg - label key
      parameters -
    • notifyInfo

      public void notifyInfo(String msg)
      Send an info notification to the UI
      Parameters:
      msg - The message string to be sent
    • notifyInfo

      public void notifyInfo(String msg, String parameters)
      Send an info notification to the UI
      Parameters:
      msg - The message string to be sent
    • notifySuccess

      public void notifySuccess(String msg)
      Send a success notification to the UI
      Parameters:
      msg - The message string to be sent
    • notifySuccess

      public void notifySuccess(String msg, String parameters)
      Send a success notification to the UI
      Parameters:
      msg - The message string to be sent
      parameters -
    • notifyWarning

      public void notifyWarning(String msg)
      Send a warning notification to the UI
      Parameters:
      msg - The message string to be sent
    • notifyWarning

      public void notifyWarning(String heading, List<Warning> mspWarnings)
      Send list of warnings as a html table to UI
      Parameters:
      heading - The heading of the table
      mspWarnings - list of warning to show in html table
    • notifyWarning

      public void notifyWarning(String msg, String parameters)
      Send a warning notification to the UI
      Parameters:
      msg - The message string to be sent
      parameters -