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 )
86 require_once
'./Services/WorkflowEngine/exceptions/ilWorkflowFilesystemException.php';
89 fclose( $file_handle );
103 if ( $extension !=
'.log' && $extension !=
'.txt' )
106 require_once
'./Services/WorkflowEngine/exceptions/ilWorkflowObjectStateException.php';
131 $this->log_message = $a_log_message;
145 if ( $a_log_message == null || $a_log_message ==
'' )
148 require_once
'./Services/WorkflowEngine/exceptions/ilWorkflowObjectStateException.php';
180 require_once
'./Services/WorkflowEngine/exceptions/ilWorkflowObjectStateException.php';
183 $this->log_level = strtoupper($a_log_level);
196 switch ( strtolower( $a_log_level ) )
240 $file_pointer = null;
257 if ( !fclose( $file_pointer ) )
260 require_once
'./Services/WorkflowEngine/exceptions/ilWorkflowFilesystemException.php';
275 require_once
'./Services/WorkflowEngine/classes/utils/class.ilWorkflowUtils.php';
276 fwrite( $file_pointer,
date(
'Y/m/d H:i:s' ).substr( (
string)ilWorkflowUtils::microtime(), 1, 6 ).
' :: ' );
277 fwrite( $file_pointer, $this->log_level.
' :: ' );
278 fwrite( $file_pointer, $this->log_message.
"\r\n" );
290 $file_pointer = fopen( $this->log_file,
'a' );
291 if ( $file_pointer == null )
294 require_once
'./Services/WorkflowEngine/exceptions/ilWorkflowFilesystemException.php';
297 return $file_pointer;
getLogFile()
Returns the log file name and path.
writeLogMessage( $file_pointer)
Writes the instances log message to the logfile.
checkExtensionValidity( $extension)
Checks if the given extension is a listed one.
acquireFilePointer()
Acquires and returns a file pointer to the instances log file.
ilWorkflowEngineElement Interface is part of the petri net based workflow engine. ...
closeFilePointer( $file_pointer)
Closes the file pointer.
getLogMessage()
Returns the currently set log message.
setLogLevel($a_log_level)
Sets the log level of the message to be logged.
execute()
Executes this action according to its settings.
checkFileWriteability( $a_log_file)
Checks if the file is "really really" writeable.
getContext()
Returns the parent object.
date( 'd-M-Y', $objPHPExcel->getProperties() ->getCreated())
getLogLevel()
Returns the currently set log level.
__construct(ilNode $a_context)
Default constructor.
setLogFile($a_log_file)
Sets the log file name and path.
determineValidityOfLogLevel( $a_log_level)
Determines, if the given log level is a valid one.
checkForExistingLogMessageContent( $a_log_message)
Checks if an actual log message is set for the instance.
ilActivity Interface is part of the petri net based workflow engine.
setLogMessage($a_log_message)
Sets the message to be logged.