Excellent article about best practices for logging errors, most of it applies for other type of logs though.