Python Logs Aren’t Code. They’re A Communication Tool.

<p>Nothing will ruin a programming session faster than bad coffee shop WiFi. And on the particular day I&rsquo;m recounting, as much as I needed the vanilla latte sitting to my left, I really needed that sweet, sweet public broadband because the power was out at home and, more importantly, so was the coffee.</p> <p>I needed all the caffeine I could get because even though I was deep in our tech stack, in the three hours I was online, I hadn&rsquo;t written a line of code. Instead, I was doing something you wouldn&rsquo;t normally associate with technical work: Reading. While some coffee shop patrons were reading novels, magazines and blog posts I was engrossed in my team&rsquo;s logs.</p> <h2><a href="https://medium.com/pipeline-a-data-engineering-resource/how-to-use-logging-query-language-to-analyze-gcp-logs-data-in-python-6f8ca6dd112b?source=post_page-----c87c91d474e5--------------------------------" rel="noopener follow" target="_blank">How to Use Logging Query Language to Analyze GCP Logs Data in Python</a></h2> <h3><a href="https://medium.com/pipeline-a-data-engineering-resource/how-to-use-logging-query-language-to-analyze-gcp-logs-data-in-python-6f8ca6dd112b?source=post_page-----c87c91d474e5--------------------------------" rel="noopener follow" target="_blank">How to use Google Cloud&rsquo;s Logs API and Logging Query Language in Python to obtain real-time data on active GCP&hellip;</a></h3> <p><a href="https://medium.com/pipeline-a-data-engineering-resource/how-to-use-logging-query-language-to-analyze-gcp-logs-data-in-python-6f8ca6dd112b?source=post_page-----c87c91d474e5--------------------------------" rel="noopener follow" target="_blank">medium.com</a></p> <p>Reviewing our various processes, I was surprised at the scope and variety of the logs I encountered. Some extensively logged every function execution and every API response.</p> <p>Others only provided logs to signal the start and end of a script&rsquo;s execution. After my review I flagged these under-logged products and the team revised logs so the majority of our products are legible and extensively logged.</p> <p>That exercise and my own experience building data pipelines made me realize that new developers are all too often making the same mistake: You&rsquo;re treating logs like code when you should be treating them like units of communication.</p> <p><a href="https://medium.com/pipeline-a-data-engineering-resource/your-logs-arent-code-they-re-a-communication-tool-c87c91d474e5">Click Here</a></p>
Tags: Code Python Tool