views:

29

answers:

2

I want to implement errorlogger in my zend application. I have created logger which I am using for debugging but Can anybody tell me what is the best way to log errors so that they are more readable in file.

I have seen Sugarcrm logger which logs error in proper format. Does anybody have created logger like this. So that I can save my time. Thanks in advance.

+1  A: 

Well there is Zend_Log wich will make loging errors with zend easy as pie. here is some tutorial I found.

Iznogood
+1  A: 

Use the Log application resource (which loads Zend_Log). It's extremely easy to set up and configure from your application.ini file, and you can set different logging options for different environments.

If you don't like the way the text is formatted, you can use use Zend_Log_Formatter to customize the text format.

Read: http://framework.zend.com/manual/en/zend.log.formatters.html

Adrian Schneider