Ocs-server/Gfx4/Errors and logging

From KDE Community Wiki
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

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)