5 require_once
'./Services/WorkflowEngine/interfaces/ilActivity.php';
7 require_once
'./Services/WorkflowEngine/interfaces/ilWorkflowEngineElement.php';
9 require_once
'./Services/WorkflowEngine/interfaces/ilNode.php';
52 $this->context = $a_context;
64 $extension = substr($a_log_file, strlen($a_log_file) - 4, 4);
67 $this->log_file = $a_log_file;
82 @$file_handle =
fopen($a_log_file,
'a+');
83 if ($file_handle == null) {
85 require_once
'./Services/WorkflowEngine/exceptions/ilWorkflowFilesystemException.php';
102 if ($extension !=
'.log' && $extension !=
'.txt') {
104 require_once
'./Services/WorkflowEngine/exceptions/ilWorkflowObjectStateException.php';
129 $this->log_message = $a_log_message;
143 if ($a_log_message == null || $a_log_message ==
'') {
145 require_once
'./Services/WorkflowEngine/exceptions/ilWorkflowObjectStateException.php';
176 require_once
'./Services/WorkflowEngine/exceptions/ilWorkflowObjectStateException.php';
179 $this->log_level = strtoupper($a_log_level);
192 switch (strtolower($a_log_level)) {
235 $file_pointer = null;
252 if (!fclose($file_pointer)) {
254 require_once
'./Services/WorkflowEngine/exceptions/ilWorkflowFilesystemException.php';
269 require_once
'./Services/WorkflowEngine/classes/utils/class.ilWorkflowUtils.php';
270 fwrite($file_pointer, date(
'Y/m/d H:i:s') . substr((
string) ilWorkflowUtils::microtime(), 1, 6) .
' :: ');
271 fwrite($file_pointer, $this->log_level .
' :: ');
272 fwrite($file_pointer, $this->log_message .
"\r\n");
284 $file_pointer =
fopen($this->log_file,
'a');
285 if ($file_pointer == null) {
287 require_once
'./Services/WorkflowEngine/exceptions/ilWorkflowFilesystemException.php';
290 return $file_pointer;
getLogFile()
Returns the log file name and path.
acquireFilePointer()
Acquires and returns a file pointer to the instances log file.
ilWorkflowEngineElement Interface is part of the petri net based workflow engine. ...
getLogMessage()
Returns the currently set log message.
closeFilePointer($file_pointer)
Closes the file pointer.
setLogLevel($a_log_level)
Sets the log level of the message to be logged.
execute()
Executes this action according to its settings.
getContext()
Returns the parent object.
getLogLevel()
Returns the currently set log level.
__construct(ilNode $a_context)
Default constructor.
setLogFile($a_log_file)
Sets the log file name and path.
checkExtensionValidity($extension)
Checks if the given extension is a listed one.
checkFileWriteability($a_log_file)
Checks if the file is "really really" writeable.
writeLogMessage($file_pointer)
Writes the instances log message to the logfile.
determineValidityOfLogLevel($a_log_level)
Determines, if the given log level is a valid one.
ilActivity Interface is part of the petri net based workflow engine.
checkForExistingLogMessageContent($a_log_message)
Checks if an actual log message is set for the instance.
setLogMessage($a_log_message)
Sets the message to be logged.