[conf] lower loglevel string

This commit is contained in:
Maxime Alves LIRMM@home 2020-12-04 18:12:42 +01:00
parent 8d414f2bdd
commit f8e546007c
1 changed files with 4 additions and 0 deletions

View File

@ -12,6 +12,7 @@ It defines the following globals :
- PROJECT_NAME (str) - PROJECT_NAME (str)
- DOMAINSDICT ({domain_name: domain_module}) - DOMAINSDICT ({domain_name: domain_module})
- PRODUCTION (bool) - PRODUCTION (bool)
- LOGLEVEL (string)
- BASE_DIR (str) - BASE_DIR (str)
- HOST (str) - HOST (str)
- PORT (int) - PORT (int)
@ -47,6 +48,7 @@ logger = logging.getLogger('halfapi')
PROJECT_NAME = os.path.basename(os.getcwd()) PROJECT_NAME = os.path.basename(os.getcwd())
DOMAINSDICT = lambda: {} DOMAINSDICT = lambda: {}
PRODUCTION = False PRODUCTION = False
LOGLEVEL = 'info'
HOST = '127.0.0.1' HOST = '127.0.0.1'
PORT = '3000' PORT = '3000'
SECRET = '' SECRET = ''
@ -136,4 +138,6 @@ if IS_PROJECT:
PRODUCTION = config.getboolean('project', 'production') or False PRODUCTION = config.getboolean('project', 'production') or False
os.environ['HALFAPI_PROD'] = str(PRODUCTION) os.environ['HALFAPI_PROD'] = str(PRODUCTION)
LOGLEVEL = config.get('project', 'loglevel').lower() or 'info'
BASE_DIR = config.get('project', 'base_dir', fallback='.') #os.getcwd()) BASE_DIR = config.get('project', 'base_dir', fallback='.') #os.getcwd())