示例#1
0
def main():

	fileLogger.info('This is info from main function Entry')
	fileLogger.warning('This is warn from main function')
	fileLogger.error('This is error from main function')
	m1.f1()
	m1.f2()
	m2.f3()
	m2.f4()
	m3.f5()
	m4.f6()
	fileLogger.info('This is info from main function Exit')

	return
示例#2
0
            "propagate": False
        }
    },

    "root": {
        "level": "DEBUG",
        "handlers": ["console", "main"],
        'propagate':False
    }
}
if __name__=='__main__':

    logger=logging.config.dictConfig(config)
    logger=logging.getLogger(__name__)
    logger.error("This is a log from main at ERROR level")
    logger.warning("This is a log from main at ERROR level")
    logger.info("Entering Main")
    
    m1.f1()
    m1.f2()
    m2.f3()
    m2.f4()
    m3.f5()
    m4.f6()
    
    logger.error("Exiting Main")