ILIAS
release_5-2 Revision v5.2.25-18-g3f80b828510
|
PhpIncludeInspection More...
Public Member Functions | |
__construct (ilNode $a_context) | |
Default constructor. More... | |
setLogFile ($a_log_file) | |
Sets the log file name and path. More... | |
getLogFile () | |
Returns the log file name and path. More... | |
setLogMessage ($a_log_message) | |
Sets the message to be logged. More... | |
getLogMessage () | |
Returns the currently set log message. More... | |
setLogLevel ($a_log_level) | |
Sets the log level of the message to be logged. More... | |
getLogLevel () | |
Returns the currently set log level. More... | |
getContext () | |
Returns the parent object. More... | |
execute () | |
Executes this action according to its settings. More... | |
setName ($name) | |
getName () | |
Protected Attributes | |
$name | |
Private Member Functions | |
checkFileWriteability ( $a_log_file) | |
Checks if the file is "really really" writeable. More... | |
checkExtensionValidity ( $extension) | |
Checks if the given extension is a listed one. More... | |
checkForExistingLogMessageContent ( $a_log_message) | |
Checks if an actual log message is set for the instance. More... | |
determineValidityOfLogLevel ( $a_log_level) | |
Determines, if the given log level is a valid one. More... | |
closeFilePointer ( $file_pointer) | |
Closes the file pointer. More... | |
writeLogMessage ( $file_pointer) | |
Writes the instances log message to the logfile. More... | |
acquireFilePointer () | |
Acquires and returns a file pointer to the instances log file. More... | |
Private Attributes | |
$context | |
$log_file = 'none.log' | |
$log_message = 'no message set' | |
$log_level = 'MESSAGE' | |
PhpIncludeInspection
PhpIncludeInspection PhpIncludeInspection Class ilLoggingActivity
This activity writes a given message with loglevel to the given logfile. Design consideration is to configure the activity at the workflows creation time, since it is triggered on known conditions.
/
Definition at line 23 of file class.ilLoggingActivity.php.
ilLoggingActivity::__construct | ( | ilNode | $a_context | ) |
Default constructor.
ilNode | $a_context |
Definition at line 50 of file class.ilLoggingActivity.php.
|
private |
Acquires and returns a file pointer to the instances log file.
ilWorkflowFilesystemException |
PhpIncludeInspection
Definition at line 288 of file class.ilLoggingActivity.php.
Referenced by execute().
|
private |
Checks if the given extension is a listed one.
(One of .log or .txt)
$extension |
ilWorkflowObjectStateException |
PhpIncludeInspection
Definition at line 101 of file class.ilLoggingActivity.php.
Referenced by setLogFile().
|
private |
Checks if the file is "really really" writeable.
$a_log_file |
ilWorkflowFilesystemException |
PhpUsageOfSilenceOperatorInspection
PhpIncludeInspection
Definition at line 79 of file class.ilLoggingActivity.php.
Referenced by setLogFile().
|
private |
Checks if an actual log message is set for the instance.
$a_log_message |
ilWorkflowObjectStateException |
PhpIncludeInspection
Definition at line 143 of file class.ilLoggingActivity.php.
Referenced by setLogMessage().
|
private |
Closes the file pointer.
$file_pointer |
ilWorkflowFilesystemException |
PhpIncludeInspection
Definition at line 255 of file class.ilLoggingActivity.php.
Referenced by execute().
|
private |
Determines, if the given log level is a valid one.
Log levels are similar to Apache log4j levels.
$a_log_level |
Definition at line 194 of file class.ilLoggingActivity.php.
References $valid.
Referenced by setLogLevel().
ilLoggingActivity::execute | ( | ) |
Executes this action according to its settings.
Implements ilActivity.
Definition at line 238 of file class.ilLoggingActivity.php.
References acquireFilePointer(), closeFilePointer(), and writeLogMessage().
ilLoggingActivity::getContext | ( | ) |
Returns the parent object.
Type is ilNode, implements ilWorkflowEngineElement
Implements ilWorkflowEngineElement.
Definition at line 228 of file class.ilLoggingActivity.php.
References $context.
ilLoggingActivity::getLogFile | ( | ) |
Returns the log file name and path.
Definition at line 116 of file class.ilLoggingActivity.php.
References $log_file.
ilLoggingActivity::getLogLevel | ( | ) |
Returns the currently set log level.
Definition at line 218 of file class.ilLoggingActivity.php.
References $log_level.
ilLoggingActivity::getLogMessage | ( | ) |
Returns the currently set log message.
Definition at line 158 of file class.ilLoggingActivity.php.
References $log_message.
ilLoggingActivity::getName | ( | ) |
Implements ilWorkflowEngineElement.
Definition at line 305 of file class.ilLoggingActivity.php.
References $name.
ilLoggingActivity::setLogFile | ( | $a_log_file | ) |
Sets the log file name and path.
string | $a_log_file | Path, name and extension of the log file. |
Definition at line 62 of file class.ilLoggingActivity.php.
References checkExtensionValidity(), and checkFileWriteability().
ilLoggingActivity::setLogLevel | ( | $a_log_level | ) |
Sets the log level of the message to be logged.
string | $a_log_level | A valid log level. |
ilWorkflowObjectStateException | on illegal log level. |
PhpIncludeInspection
Definition at line 174 of file class.ilLoggingActivity.php.
References $valid, and determineValidityOfLogLevel().
ilLoggingActivity::setLogMessage | ( | $a_log_message | ) |
Sets the message to be logged.
string | $a_log_message | Text of the log message |
Definition at line 128 of file class.ilLoggingActivity.php.
References checkForExistingLogMessageContent().
ilLoggingActivity::setName | ( | $name | ) |
string | $name |
Implements ilWorkflowEngineElement.
Definition at line 300 of file class.ilLoggingActivity.php.
References $name.
|
private |
Writes the instances log message to the logfile.
$file_pointer |
PhpIncludeInspection
Definition at line 272 of file class.ilLoggingActivity.php.
References date.
Referenced by execute().
|
private |
Definition at line 26 of file class.ilLoggingActivity.php.
Referenced by getContext().
|
private |
Definition at line 29 of file class.ilLoggingActivity.php.
Referenced by getLogFile().
|
private |
Definition at line 40 of file class.ilLoggingActivity.php.
Referenced by getLogLevel().
|
private |
Definition at line 32 of file class.ilLoggingActivity.php.
Referenced by getLogMessage().
|
protected |
Definition at line 43 of file class.ilLoggingActivity.php.