PHP Classes
elePHPant
Icontem

Every normal program first need to handle exception and only ...

Recommend this page to a friend!

      Error Logging  >  All threads  >  Every normal program first need to...  >  (Un) Subscribe thread alerts  
Subject:Every normal program first need to...
Summary:Package rating comment
Messages:2
Author:Andrey Nikishaev
Date:2011-07-13 11:32:43
Update:2011-07-13 12:26:33
 

Andrey Nikishaev rated this package as follows:

Utility: Bad
Consistency: Sufficient
Examples: Bad

  1. Every normal program first need to...   Reply   Report abuse  
Andrey Nikishaev - 2011-07-13 11:32:43
Every normal program first need to handle exception and only then if it's needed to log something. Unhandled exceptions it's one of the criterion of bad developed application.
But even if just look at functionality of your package i see many serious problems.
First it's sending errors to email. Just imagine that you have application that use 100k users, and for every user application will send the same error to admin email. It will cause marking your server as a spam server, and flood admin email with thousand of emails.
Second, when you write logs to the file you must make it rotating else you will have error file with size in gigabytes.

  2. Re: Every normal program first need to...   Reply   Report abuse  
Nitesh Apte - 2011-07-13 12:26:33 - In reply to message 1 from Andrey Nikishaev
It depends upon you how to use it. I gave a concept of handling fatal errors using custom error handler(I don't think your package provide this feature), not a solution for a particular problem. Also, I did make an extra feature of error logging in file and sending error in mail, but this doesn't mean that you are required to implement it. You can write code above this package implementing your requirement.

Use it smartly, you will benefit a lot.

PS: Problem is never in code, problem is in unawareness of the logic or motive behind the implementation. :)