Techniques for Writing Secure Code
Logging
log as much as possible, especially any errors that occur
when possible, catch fatal errors and log them along with all other problems
start off logging as much as possible, trim down later