Ocs-server/Gfx4/Errors and logging
Appearance
< Ocs-server | Gfx4
Gfx provides some functions to handle error management and logging with the ELog class.
Short list of static methods that can be used anywhere:
- ELog::error($e) -> prints/writes/ignore an error depending on configuration. Error is critical and will stop the script instantly.
- ELog::warning($e) -> prints/writes/ignore a warning depending on configuration. Warning is not critical and the script will continue its execution
- ELog::d($d) -> echoes $d in pre tags
- ELog::pd($d) -> var_dumps $d in pre tags
- ELog::clear_log() -> erases all the content of log files (error.log and warning.log)