PHP Classes

Good idea.

Recommend this page to a friend!

      Error Logging  >  All threads  >  Good idea.  >  (Un) Subscribe thread alerts  
Subject:Good idea.
Summary:Package rating comment
Messages:4
Author:Brandon Sussman
Date:2010-12-02 17:10:44
Update:2011-02-01 00:26:19
 

Brandon Sussman rated this package as follows:

Utility: Not sure
Consistency: Not sure
Examples: Insufficient

  1. Good idea.   Reply   Report abuse  
Picture of Brandon Sussman Brandon Sussman - 2010-12-02 17:10:45
Good idea.
But no doc, no annotation in example.

Example is not a well formed web page.

Abandoned after attempts to trace and debug in effort to discover how the class works.

  2. Re: Good idea.   Reply   Report abuse  
Picture of Nitesh Apte Nitesh Apte - 2010-12-02 17:29:41 - In reply to message 1 from Brandon Sussman
Just initialize the class (as in given example script) in you header file which you include all the time and make the required changes in configuration file. If there is any error in the script below this line - new ErrorLogging, error will caught and will be displayed in custom format.

That's it. No extra effort.


  3. Re: Good idea.   Reply   Report abuse  
Picture of Pete Haro Pete Haro - 2011-02-01 00:23:12 - In reply to message 2 from Nitesh Apte
Your class is very useful, thanks!

BUT the configurations in conf.inc should be embraced in PHP's opening and closing tags:
<?php
/**
* Error Handling Values
*/
define('DEBUGGING', TRUE);
....
?>

because otherwise PHP includes it as is, it doesn't interpret it when requiring the file - so it appears on the page as an HTML-output.
And you didn't document the _fatalError() function and the parts of the other functions aren't documented either.

BUT (!!) your class is very-very good, I'm already using it (I just made some polishing - e.g. sending the error mail with the help of PHPMailer class, and customizing the output, etc.), so I'm thankful to you for publishing this class!

Pete

  4. Re: Good idea.   Reply   Report abuse  
Picture of Pete Haro Pete Haro - 2011-02-01 00:26:19 - In reply to message 3 from Pete Haro
Just one more:
you should show the beginners in your example file that they must include the class file first to make it work, for example like this:
require_once('class.ErrorLogging.php'); //it works if the class file is in the same directory as the example file