Class GroovyLogService


public class GroovyLogService extends CayenneService
Provides a Groovy Service Logging service.
Since:
4.2.0
  • Constructor Details

    • GroovyLogService

      public GroovyLogService()
  • Method Details

    • logServiceCall

      public GroovyServiceLog logServiceCall(ServiceDefinition serviceDefinition, Date startTime, com.jezhumble.javasysmon.CpuTimes startCpuTimes, Long startFreeMemory, jakarta.servlet.http.HttpServletRequest request, Submission submission, Form form, Client client, ErrorLog errorLog, boolean debugEnabled, String funcTrigger)
      Log Groovy Service invocation using the specified parameters.
      Parameters:
      serviceDefinition - the service invoked (required)
      startTime - the time the service was invoked (required)
      startCpuTimes - the start CPU times when the service was invoked (required)
      startFreeMemory - the free memory in bytes when the service was invoked (required)
      request - the servlet request (optional)
      submission - the associated submission (optional)
      form - the associated form (optional)
      client - the associated client (optional)
      errorLog - the associated error log (optional)
      debugEnabled - specify whether DEBUG level logging is enabled
      funcTrigger - the function trigger type
      Returns:
      a new persisted GroovyServiceLog object
    • setCommitChanges

      public GroovyLogService setCommitChanges(boolean commitChanges)
      Commit changes with the Groovy Service Log.
      Parameters:
      commitChanges - the commit changes flag
      Returns:
      the Groovy Logger service
      Since:
      4.3.3.1
    • setLogger

      public GroovyLogService setLogger(Logger logger)
      Set the Groovy logger instance.
      Parameters:
      logger - the Groovy logger instance
      Returns:
      the Groovy Logger service
      Since:
      17.10.0
    • setInputParams

      public GroovyLogService setInputParams(Map<String,Object> inputParams)
      Set the input parameters.
      Parameters:
      inputParams - the inputParams to set
      Returns:
      the Groovy Logger service
      Since:
      17.10.0
    • setOutputResult

      public GroovyLogService setOutputResult(Object outputResult)
      Set the output result data.
      Parameters:
      outputResult - the outputResult to set
      Returns:
      the Groovy Logger service
      Since:
      17.10.0
    • setThreadSubmission

      public static void setThreadSubmission(Submission submission)
      Set the thread local context submission, for associating groovy service log records with any executing submission context.
      Parameters:
      submission - the submission to set on the thread local context
      Since:
      17.10.0
    • clearThreadSubmission

      public static void clearThreadSubmission()
      Clear the thread local submission context.
      Since:
      17.10.0