I like logging certain errors and information straight to syslog, like failed logins to my site's admin section.
It's also a less intrusive way to debug your code. The PEAR Log class lets you log to syslog, your own log files,
SQL databases, and more. It also has some more sophisticated features that let you "attach" classes to logs and
then "notify" those classes when things are logged. I have yet to tackle those features, but they sound
interesting. I'm going to build on the PEAR DB example to incorporate the Log class.
Now tail your syslog and run the above example. You should find that there are some errors. It includes all sorts
of date information and the identifier (the second argument in the constructor) you assigned your log. You can
alternately use your own log files by using the type 'file' instead of 'syslog'.