for log_conf in ('log.ini', os.path.expanduser('~/.sercom/log.ini'), '/etc/sercom/log.ini'):
if (os.access(log_conf, os.R_OK)):
logging.config.fileConfig(log_conf)
log = logging.getLogger(tipo)
return log
for log_conf in ('log.ini', os.path.expanduser('~/.sercom/log.ini'), '/etc/sercom/log.ini'):
if (os.access(log_conf, os.R_OK)):
logging.config.fileConfig(log_conf)
log = logging.getLogger(tipo)
return log