ILIAS
release_8 Revision v8.19
|
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...
Public Member Functions | |
__construct (string $a_log_path, string $a_log_file, string $a_tag="", bool $a_enabled=true, ?int $a_log_level=null) | |
setLogLevel (int $a_log_level) | |
checkLogLevel ($a_log_level) | |
setLogFormat (string $a_format) | |
getLogFormat () | |
setPath (string $a_str) | |
setFilename (string $a_str) | |
setTag (string $a_str) | |
writeLanguageLog (string $a_topic, string $a_lang_key) | |
special language checking routine More... | |
writeWarning (string $a_message) | |
special warning message More... | |
logError (string $a_code, string $a_msg) | |
this function is automatically called by class.ilErrorHandler in case of an error To log manually please use $this::write More... | |
write (string $a_msg, $a_log_level=null) | |
logging More... | |
logStack (string $a_message='') | |
dump ($a_var, ?int $a_log_level=null) | |
delete () | |
delete logfile More... | |
Protected Attributes | |
int | $default_log_level |
int | $current_log_level |
bool | $enabled |
Private Member Functions | |
open () | |
Open log file. More... | |
Private Attributes | |
string | $path = '' |
string | $filename = '' |
string | $tag = '' |
string | $log_format = '' |
int | $FATAL |
Log level 10: Log only fatal errors that could lead to serious problems. More... | |
int | $WARNING |
Log level 20: This is the standard log level that is set if no level is given. More... | |
int | $MESSAGE |
Log level 30: Logs messages and notices that are less important for system functionality like not translated language values. More... | |
$fp = null | |
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.
ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.
If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning
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 30 of file class.ilLog.php.
ilLog::__construct | ( | string | $a_log_path, |
string | $a_log_file, | ||
string | $a_tag = "" , |
||
bool | $a_enabled = true , |
||
?int | $a_log_level = null |
||
) |
Definition at line 61 of file class.ilLog.php.
References $WARNING, ilLogLevel\CRITICAL, ilLogLevel\INFO, open(), setLogFormat(), setLogLevel(), and ilLogLevel\WARNING.
ilLog::checkLogLevel | ( | $a_log_level | ) |
int | $a_log_level |
Definition at line 102 of file class.ilLog.php.
References $default_log_level, and ILIAS\Repository\int().
Referenced by write().
ilLog::delete | ( | ) |
delete logfile
Definition at line 264 of file class.ilLog.php.
Referenced by ilSurveyQuestionpoolExport\buildExportFileXML().
ilLog::dump | ( | $a_var, | |
?int | $a_log_level = null |
||
) |
Definition at line 242 of file class.ilLog.php.
References write().
ilLog::getLogFormat | ( | ) |
Definition at line 119 of file class.ilLog.php.
References $log_format.
Referenced by write().
ilLog::logError | ( | string | $a_code, |
string | $a_msg | ||
) |
this function is automatically called by class.ilErrorHandler in case of an error To log manually please use $this::write
Definition at line 176 of file class.ilLog.php.
References write().
ilLog::logStack | ( | string | $a_message = '' | ) |
Definition at line 233 of file class.ilLog.php.
References Vendor\Package\$e, and write().
Referenced by write().
|
private |
Open log file.
Definition at line 250 of file class.ilLog.php.
Referenced by __construct(), and write().
ilLog::setFilename | ( | string | $a_str | ) |
Definition at line 135 of file class.ilLog.php.
ilLog::setLogFormat | ( | string | $a_format | ) |
Definition at line 114 of file class.ilLog.php.
Referenced by __construct().
ilLog::setLogLevel | ( | int | $a_log_level | ) |
Definition at line 85 of file class.ilLog.php.
References $default_log_level, $FATAL, $MESSAGE, and $WARNING.
Referenced by __construct().
ilLog::setPath | ( | string | $a_str | ) |
Definition at line 124 of file class.ilLog.php.
ilLog::setTag | ( | string | $a_str | ) |
Definition at line 146 of file class.ilLog.php.
ilLog::write | ( | string | $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
?int | $a_log_level |
Definition at line 211 of file class.ilLog.php.
References checkLogLevel(), getLogFormat(), ILIAS\Repository\int(), logStack(), and open().
Referenced by dump(), ilObjGlossary\exportFileItems(), ilObjContentObject\exportFileItems(), ilStructureObject\exportXML(), ilObjGlossary\exportXML(), ilObjContentObject\exportXML(), ilObjGlossary\exportXMLGlossaryItems(), ilObjGlossary\exportXMLMediaObjects(), ilObjContentObject\exportXMLMediaObjects(), ilObjContentObject\exportXMLPageObjects(), logError(), logStack(), ilOrgUnitSimpleUserImportGUI\startImport(), ilOrgUnitSimpleImportGUI\startImport(), writeLanguageLog(), and writeWarning().
ilLog::writeLanguageLog | ( | string | $a_topic, |
string | $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
Definition at line 157 of file class.ilLog.php.
References write().
ilLog::writeWarning | ( | string | $a_message | ) |
special warning message
Definition at line 167 of file class.ilLog.php.
References write().
|
protected |
Definition at line 58 of file class.ilLog.php.
|
protected |
Definition at line 57 of file class.ilLog.php.
Referenced by checkLogLevel(), and setLogLevel().
|
protected |
Definition at line 59 of file class.ilLog.php.
|
private |
Log level 10: Log only fatal errors that could lead to serious problems.
Definition at line 40 of file class.ilLog.php.
Referenced by setLogLevel().
|
private |
Definition at line 33 of file class.ilLog.php.
|
private |
Definition at line 55 of file class.ilLog.php.
|
private |
Definition at line 35 of file class.ilLog.php.
Referenced by getLogFormat().
|
private |
Log level 30: Logs messages and notices that are less important for system functionality like not translated language values.
Definition at line 50 of file class.ilLog.php.
Referenced by setLogLevel().
|
private |
Definition at line 32 of file class.ilLog.php.
|
private |
Definition at line 34 of file class.ilLog.php.
|
private |
Log level 20: This is the standard log level that is set if no level is given.
Definition at line 45 of file class.ilLog.php.
Referenced by __construct(), and setLogLevel().