Simple Python logging - Output to stdout

In this code snippet we will explain you how to add simple python logging into your codes

import logging

logging.basicConfig(filename="log_file.log", format='%(asctime)s %(message)s', filemode='w')
logger = logging.getLogger()
logger.setLevel(logging.DEBUG)"Some random logging message")

As you can see above it just require 5 line of codes to enable logging in python