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 TypeMethodDescriptionvoid
acceptException
(Exception exception) Called if the script fails with an exception.void
acceptExecutionEnd
(Serializable output) Called if the script completes without exception.void
acceptExecutionStart
(ExecuteCodeInput executeCodeInput) Called when the execution starts - takes the execution's input object.void
acceptLogLine
(String logLine) Called to log a line, a message.protected QRecord
buildDetailLogRecord
(String logLine) Getter for scriptLogGetter for scriptLogLinesvoid
setScriptId
(Integer scriptId) protected void
setScriptLog
(QRecord scriptLog) Setter for scriptLogprotected void
setScriptLogLines
(List<QRecord> scriptLogLines) Setter for scriptLogLinesvoid
setScriptRevisionId
(Integer scriptRevisionId) protected void
updateHeaderAtEnd
(Serializable output, Exception exception) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:QCodeExecutionLoggerInterface
Called when the execution starts - takes the execution's input object.- Specified by:
acceptExecutionStart
in interfaceQCodeExecutionLoggerInterface
-
acceptLogLine
Description copied from interface:QCodeExecutionLoggerInterface
Called to log a line, a message.- Specified by:
acceptLogLine
in interfaceQCodeExecutionLoggerInterface
-
acceptException
Description copied from interface:QCodeExecutionLoggerInterface
Called if the script fails with an exception.- Specified by:
acceptException
in interfaceQCodeExecutionLoggerInterface
-
acceptExecutionEnd
Description copied from interface:QCodeExecutionLoggerInterface
Called if the script completes without exception.- Specified by:
acceptExecutionEnd
in interfaceQCodeExecutionLoggerInterface
-
getScriptLog
Getter for scriptLog -
getScriptLogLines
-
setScriptLog
Setter for scriptLog -
setScriptLogLines
-
setScriptId
- Specified by:
setScriptId
in interfaceScriptExecutionLoggerInterface
-
setScriptRevisionId
- Specified by:
setScriptRevisionId
in interfaceScriptExecutionLoggerInterface
-