logging.htm
Application Logging
Logs should be greppable. It should be focused entirely on a single line of log. NEVER over multiple lines.
We want to answer questions such as:
- When did user 55 last log in?
- Is our incoming connection receiving messages?
- How many times did our web server go dead?
- Did any transaction fail to complete?
Problems to avoid:
- Log is missing necessary information
- Log unsuitable for grep because of redundant information (if it mentions a website on every linge we can't find those that were activated by the website)
- Information is split across more than one line
- Error reported to user but not logged
e.g.,
try