set loglevel even if in production
This commit is contained in:
parent
c99e636d6e
commit
5a0509a114
|
@ -33,7 +33,7 @@ def run(host, port, reload):
|
|||
reload = False
|
||||
raise Exception('Can\'t use live code reload in production')
|
||||
|
||||
log_level = 'info' if PRODUCTION else LOGLEVEL
|
||||
log_level = LOGLEVEL or 'info'
|
||||
|
||||
click.echo(f'Launching application {PROJECT_NAME}')
|
||||
|
||||
|
@ -41,6 +41,13 @@ def run(host, port, reload):
|
|||
|
||||
list_api_routes()
|
||||
|
||||
click.echo(f'uvicorn.run("halfapi.app:application"\n' \
|
||||
f'host: {host}\n' \
|
||||
f'port: {port}\n' \
|
||||
f'log_level: {log_level}\n' \
|
||||
f'reload: {reload}\n'
|
||||
)
|
||||
|
||||
uvicorn.run('halfapi.app:application',
|
||||
host=host,
|
||||
port=int(port),
|
||||
|
|
Loading…
Reference in New Issue