import logging
##Logging Basic Configurations
logging.basicConfig(filename="Scriptlog.log" , format='%(asctime)s %(message)s', filemode='w')
logger = logging.getLogger('logger')
logger.setLevel(logging.INFO) #Log Level can be changed to DEBUG, ERROR, WARNING etc.
##Put below logger where you want logging
logger.info("Python script has been completed")
##Logging Basic Configurations
logging.basicConfig(filename="Scriptlog.log" , format='%(asctime)s %(message)s', filemode='w')
logger = logging.getLogger('logger')
logger.setLevel(logging.INFO) #Log Level can be changed to DEBUG, ERROR, WARNING etc.
##Put below logger where you want logging
logger.info("Python script has been completed")
No comments:
Post a Comment