diff --git a/src/gunicorn.conf.py b/src/gunicorn.conf.py index cba84b21..f046bb86 100644 --- a/src/gunicorn.conf.py +++ b/src/gunicorn.conf.py @@ -1,4 +1,5 @@ import dashboard +import os from datetime import datetime global sqldb, cursor, DashboardConfig, WireguardConfigurations, AllPeerJobs, JobLogger, Dash app_host, app_port = dashboard.gunicornConfig() @@ -16,7 +17,7 @@ daemon = True pidfile = './gunicorn.pid' wsgi_app = "dashboard:app" accesslog = f"./log/access_{date}.log" -loglevel = "info" +loglevel = os.environ['log_level'] if 'log_level' in os.environ else 'info' capture_output = True errorlog = f"./log/error_{date}.log" pythonpath = "., ./modules"