In xyz file there will be having all .py files such as abcd.py efg.py etc which are to tested with logging.info instead print statements I have set the configuration for logging.info as follows in the code but messages are not loading into log file
for example
logging.info('hi')
'hi' is not been loading into the concerned log file
import logging.config
config={
'version': 1,
'formatters': {'default': {
'format': '[%(asctime)s] %(levelname)s in %(module)s: %(message)s',
}},
'handlers': {'wsgi': {
'class': 'logging.StreamHandler',
'stream': 'ext://flask.logging.wsgi_errors_stream',
'formatter': 'default'
},
'fileHandler':{
'class':'logging.handler.RotatingFileHandler',
'formatter':'default',
'filename':'log_info.log'
'maxBytes':512000,
'backupCount':5
}},
'root': {
'level': 'INFO',
'handlers': ['wsgi']
},
'xyz':{
'handler':['fileHandler'],
'level':['info']
}}
logging.config.dictConfig(config)
log=logging.getLogger('root')