I Spent 4 Hours Debugging a "Missing" Log Line That Was Never Missing
by•
I added logging. The log line didn't appear. I assumed the code wasn't executing. I restructured the function, added more logs, restructured again.
Four hours later I found it. The log line was there. It was being written to a file I wasn't tailing because the path had changed two deploys ago and I was looking at the old one.
The code was fine. My observation was wrong. I had been debugging my own view of the system instead of the system itself.
Now I verify the observation channel before I touch the code. Where is the output actually going? Am I looking at the right place? It takes thirty seconds and has saved me hours.
What's a bug you "fixed" that was never actually broken?
1 view
Replies
Be the first to reply
Have a question or a thought to share? Add a comment above to start the conversation.