Member-only story
Heroku Logging Best Practices: A guide to log and troubleshooting
13 min readMar 9, 2020
Logging is just something I’m used to, and I don’t recall when I started to use it and noticed its importance.
But we should change this way of thinking.
In this article I will be talking about logging, and what you need to know about it when using Heroku.
Table of Contents1. Logging: what are the best practices?
1.1 Be aware of the levels
1.2 What is your default log level?
1.3 For each level address channels
1.4 Log retention policy
1.5 Logging personal information or secrets
1.6 Use the appropriate tools
1.7 Same log format in every environment2. Heroku Logging Overview
2.1 Logplex, sources, and drains
2.2 Heroku and file-based logging
2.3 Heroku and Syslog or Database drains
2.4 Troubleshooting with Heroku logs
I never put too much thought into it until recently, but the reality is when we are in a development environment with a debugger at hand we don’t even remember that logging exists.
And when we think of it?