Programming Leftovers
-
Ruby: how to get the MD5 hash of a file
This uses Digest::Class.file, the base class for Digest::MD5.
-
Some notes on modular JSON Schema definitions
Here are a few rambling notes-to-self on understanding how a modular JSON Schema definition might be constructed. I've recently become acquainted with JSON Schema through the BTP Setup Automator project.
-
Python Logging Guide: The Basics
Once your Python programs grow beyond basic scripts run from a command line, using print() statements for logging becomes a difficult practice to scale. Using print()logging modules enable you to better control where, how, and what you log, with much more granularity. As a result, you can reduce debugging time, improve code quality, and increase the visibility of your infrastructure.
To help you get up to speed with Python logging, we’re creating a multi-part guide to cover what you need to know to make your Python logging efficient, useful, and scalable. To get the most out of this guide, you should be comfortable with basic Python programming and understand general logging best practices.
In this first post, Part One of our overview on Python logging, we’ll introduce you to the default logging module and log levels, and we’ll walk through basic examples of how you can get started with Python logging.