Search

Showing posts with label Logging. Show all posts
Showing posts with label Logging. Show all posts

22 October, 2018

Quick guide to Logging to a file using Python

This is for setting up of a file logging system using Logging module


Step 1: Import the logging module.



import logging


Step 2: Create a logger for yourself. 


logger = logging.getLogger(__name__)