Logging as an Anti-Pattern
“ You can use logging for everything! ” — #CowboyDeveloper Well, technically speaking, the resident #CowboyDeveloper is correct, you can use logging for everything • Metrics : Print out your data, and cut/paste them from the terminal into Google Sheets. Voila! You can now generate all the charts you need from this data! ( I’m not joking. I know a dude that actually did this! ) • Alerting : tail -f | grep on your logs, and if anything bad happens, pipe it to sendmail. ( Yes. sendmail was a thing. Don’t ask ) • Monitoring : tail -f | grep on your logs across many, many terms. ( One for each server, times the number of things you are looking for ) • Debugging : You know the drill. Throw enough print() statements in there, and, with enough hair-pulling, you can figure out the problem. • Tracing : Uhhh, what’s that? ( And, once explained, “solved” by sticking unique IDs into each log statement. Again, don’...