Class BuildScriptLogAndScriptLogLineExecutionLogger
java.lang.Object
com.kingsrook.qqq.backend.core.actions.scripts.logging.BuildScriptLogAndScriptLogLineExecutionLogger
- All Implemented Interfaces:
QCodeExecutionLoggerInterface,ScriptExecutionLoggerInterface,Serializable
- Direct Known Subclasses:
AccumulatingBuildScriptLogAndScriptLogLineExecutionLogger,StoreScriptLogAndScriptLogLineExecutionLogger
public class BuildScriptLogAndScriptLogLineExecutionLogger
extends Object
implements QCodeExecutionLoggerInterface, ScriptExecutionLoggerInterface
Implementation of a code execution logger that builds a scriptLog and 0 or more
scriptLogLine records - but doesn't insert them. e.g., useful for testing
(both in junit, and for users in-app).
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionConstructorBuildScriptLogAndScriptLogLineExecutionLogger(Serializable scriptId, Serializable scriptRevisionId) Constructor -
Method Summary
Modifier and TypeMethodDescriptionvoidacceptException(Exception exception) Called if the script fails with an exception.voidacceptExecutionEnd(Serializable output) Called if the script completes without exception.voidacceptExecutionStart(ExecuteCodeInput executeCodeInput) Called when the execution starts - takes the execution's input object.voidacceptLogLine(String logLine) Called to log a line, a message.protected QRecordbuildDetailLogRecord(String logLine) Getter for scriptLogGetter for scriptLogLinesvoidsetScriptId(Integer scriptId) protected voidsetScriptLog(QRecord scriptLog) Setter for scriptLogprotected voidsetScriptLogLines(List<QRecord> scriptLogLines) Setter for scriptLogLinesvoidsetScriptRevisionId(Integer scriptRevisionId) protected voidupdateHeaderAtEnd(Serializable output, Exception exception) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.kingsrook.qqq.backend.core.actions.scripts.logging.QCodeExecutionLoggerInterface
log
-
Field Details
-
executeCodeInput
-
-
Constructor Details
-
BuildScriptLogAndScriptLogLineExecutionLogger
public BuildScriptLogAndScriptLogLineExecutionLogger()Constructor -
BuildScriptLogAndScriptLogLineExecutionLogger
public BuildScriptLogAndScriptLogLineExecutionLogger(Serializable scriptId, Serializable scriptRevisionId) Constructor
-
-
Method Details
-
buildDetailLogRecord
-
updateHeaderAtEnd
-
acceptExecutionStart
Description copied from interface:QCodeExecutionLoggerInterfaceCalled when the execution starts - takes the execution's input object.- Specified by:
acceptExecutionStartin interfaceQCodeExecutionLoggerInterface
-
acceptLogLine
Description copied from interface:QCodeExecutionLoggerInterfaceCalled to log a line, a message.- Specified by:
acceptLogLinein interfaceQCodeExecutionLoggerInterface
-
acceptException
Description copied from interface:QCodeExecutionLoggerInterfaceCalled if the script fails with an exception.- Specified by:
acceptExceptionin interfaceQCodeExecutionLoggerInterface
-
acceptExecutionEnd
Description copied from interface:QCodeExecutionLoggerInterfaceCalled if the script completes without exception.- Specified by:
acceptExecutionEndin interfaceQCodeExecutionLoggerInterface
-
getScriptLog
Getter for scriptLog -
getScriptLogLines
-
setScriptLog
Setter for scriptLog -
setScriptLogLines
-
setScriptId
- Specified by:
setScriptIdin interfaceScriptExecutionLoggerInterface
-
setScriptRevisionId
- Specified by:
setScriptRevisionIdin interfaceScriptExecutionLoggerInterface
-