Python logging module utility functions