Ocs-server/Gfx4/Errors and logging

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)

This page was last edited on 28 July 2015, at 13:54. Content is available under Creative Commons License SA 4.0 unless otherwise noted.