Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
12 lines (9 sloc) 443 Bytes
import logging
def configura_log(nivel):
LOG_FORMAT = '%(levelname)s - %(asctime)s - %(message)s'
log_level = getattr(logging, nivel.upper(), None)
logging.basicConfig(format=LOG_FORMAT, datefmt='%m/%d/%Y %I:%M:%S %p', level=log_level)
return logging.getLogger('miui_dev_downloader')
def configura_log_db(nivel):
log_level = nivel.upper() or logging.WARNING
logging.getLogger('sqlalchemy.engine').setLevel(log_level)