import sys import logging # Define the logging format logging_str = "[%(asctime)s: %(levelname)s: %(module)s: %(message)s]" # Configure logging to print ONLY to the console (stdout) logging.basicConfig( level= logging.INFO, format= logging_str, handlers=[ logging.StreamHandler(sys.stdout) ] ) # Create the logger object that the rest of the application can import logger = logging.getLogger("cnnClassifierLogger")