ILIAS
Release_4_0_x_branch Revision 61816
|
logging More...
Public Member Functions | |
ilLog ($a_log_path, $a_log_file, $a_tag="", $a_enabled=true, $a_log_level=NULL) | |
constructor | |
setLogLevel ($a_log_level) | |
set global log level | |
checkLogLevel ($a_log_level) | |
determine log level | |
setLogFormat ($a_format) | |
getLogFormat () | |
setPath ($a_str) | |
setFilename ($a_str) | |
setTag ($a_str) | |
writeLanguageLog ($a_topic, $a_lang_key) | |
special language checking routine | |
writeWarning ($a_message) | |
special warning message | |
logError ($a_code, $a_msg) | |
this function is automatically called by class.ilErrorHandler in case of an error To log manually please use $this::write public | |
write ($a_msg, $a_log_level=NULL) | |
logging | |
logStack ($a_message= '') | |
__destruct () | |
delete () | |
delete logfile |
Data Fields | |
$path | |
$filename | |
$tag | |
$log_format | |
$FATAL | |
$WARNING | |
$MESSAGE |
Private Member Functions | |
open () |
logging
this class provides a logging feature to the application this class is easy to use. call the constructor with e.g. $log = new Log(); you can give a filename if you want, else the defaultfilename is used.
Definition at line 37 of file class.ilLog.php.
ilLog::__destruct | ( | ) |
Definition at line 287 of file class.ilLog.php.
ilLog::checkLogLevel | ( | $a_log_level | ) |
determine log level
private
integer | log level |
Definition at line 129 of file class.ilLog.php.
Referenced by write().
ilLog::delete | ( | ) |
delete logfile
Definition at line 297 of file class.ilLog.php.
ilLog::getLogFormat | ( | ) |
Definition at line 147 of file class.ilLog.php.
References $log_format.
Referenced by write().
ilLog::ilLog | ( | $a_log_path, | |
$a_log_file, | |||
$a_tag = "" , |
|||
$a_enabled = true , |
|||
$a_log_level = NULL |
|||
) |
constructor
set the filename
string |
Definition at line 80 of file class.ilLog.php.
References $WARNING, ILIAS_ABSOLUTE_PATH, open(), setLogFormat(), and setLogLevel().
ilLog::logError | ( | $a_code, | |
$a_msg | |||
) |
this function is automatically called by class.ilErrorHandler in case of an error To log manually please use $this::write public
integer | error level code from PEAR_Error |
string | error message |
Definition at line 202 of file class.ilLog.php.
References write().
ilLog::logStack | ( | $a_message = '' | ) |
|
private |
Definition at line 279 of file class.ilLog.php.
Referenced by ilLog(), and write().
ilLog::setFilename | ( | $a_str | ) |
Definition at line 157 of file class.ilLog.php.
ilLog::setLogFormat | ( | $a_format | ) |
Definition at line 142 of file class.ilLog.php.
Referenced by ilLog().
ilLog::setLogLevel | ( | $a_log_level | ) |
set global log level
private
integer | log level |
Definition at line 107 of file class.ilLog.php.
References $FATAL, $MESSAGE, and $WARNING.
Referenced by ilLog().
ilLog::setPath | ( | $a_str | ) |
Definition at line 152 of file class.ilLog.php.
ilLog::setTag | ( | $a_str | ) |
Definition at line 162 of file class.ilLog.php.
ilLog::write | ( | $a_msg, | |
$a_log_level = NULL |
|||
) |
logging
this method logs anything you want. It appends a line to the given logfile. Datetime and client id is appended automatically You may set the log level in each call. Leave blank to use default log level
specified in ilias.ini: [log] level = "<level>" possible values are fatal,warning,message
public
string | error message |
integer | log level (optional) |
Definition at line 241 of file class.ilLog.php.
References checkLogLevel(), getLogFormat(), logStack(), and open().
Referenced by logError(), logStack(), writeLanguageLog(), and writeWarning().
ilLog::writeLanguageLog | ( | $a_topic, | |
$a_lang_key | |||
) |
special language checking routine
only add a log entry to the logfile if there isn't a log entry for the topic
string | public |
Definition at line 176 of file class.ilLog.php.
References write().
ilLog::writeWarning | ( | $a_message | ) |
special warning message
string | public |
Definition at line 189 of file class.ilLog.php.
References write().
ilLog::$FATAL |
Definition at line 55 of file class.ilLog.php.
Referenced by setLogLevel().
ilLog::$filename |
Definition at line 46 of file class.ilLog.php.
ilLog::$log_format |
Definition at line 48 of file class.ilLog.php.
Referenced by getLogFormat().
ilLog::$MESSAGE |
Definition at line 69 of file class.ilLog.php.
Referenced by setLogLevel().
ilLog::$path |
Definition at line 45 of file class.ilLog.php.
ilLog::$tag |
Definition at line 47 of file class.ilLog.php.
ilLog::$WARNING |
Definition at line 62 of file class.ilLog.php.
Referenced by ilLog(), and setLogLevel().