crabfinger Posted January 31, 2010 Share Posted January 31, 2010 I want to create an error logger for a content management system I'm building, I just would like to know what the best way to format an error is and what information should be taken from these errors. Quote Link to comment https://forums.phpfreaks.com/topic/190459-error-message-format/ Share on other sites More sharing options...
zeodragonzord Posted March 15, 2010 Share Posted March 15, 2010 Personally, I like to collect some or all this data: datetime when the error occurred filename where the error occurred class and function where the error occurred category of the error (database, bad input, logic, etc) if this occurred in Pear::MDB2, then record the Pear error message error level (critical, low, etc) I put all those into an object and that gets passed to an error handling object that looks at the error level and decides if it should send an email to me, log it into a file, or insert the error message into a database. Quote Link to comment https://forums.phpfreaks.com/topic/190459-error-message-format/#findComment-1026536 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.