Semicolon & Sons
X
About
Contact & Support
Code Diary
Episodes
Blog
Subscribe
Sign in
Semicolon & Sons
About
Screencasts
Code Diary
Blog
Contact & Support
Subscribe
Sign In
Logging Code Diary Entries
This is part of the Semicolon&Sons
Code Diary
- consisting of lessons learned on the job.
Ask yourself whether printed text is program output or program logs and style accordingingly
Do not report what a program is doing in the imperative
Do not separate new lines from contents in logs
How to use syslog
Log performance penalties may still be incurred at quieter log levels
Send errors to STDERR
What is dmesg
When adding temporary debugging statements for diverse environments it may be easier to give them higher log levels