Posted By

BenJD on 02/22/11


Tagged

logging


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

uberdragon


Error Logger


 / Published in: PHP
 

Log errors to a file

  1. class ErrorLog
  2. {
  3. public static function recordError($error)
  4. {
  5. $stream = fopen(Config::SHELL_LIBRARY_ROOT."error_log.txt","a");
  6. fwrite($stream,$error."\n");
  7. fclose($stream);
  8. }
  9. }

Report this snippet  

You need to login to post a comment.