Skip to content

Commit

Permalink
[frontend] init logging before get_app call (#960)
Browse files Browse the repository at this point in the history
  • Loading branch information
Drumor committed Jul 6, 2023
1 parent af0cee6 commit 161d4a5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion inginious-webapp
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,13 @@ if not configfile:

# Load configuration and application (!!! For mod_wsgi, application identifier must be present)
config = load_json_or_yaml(configfile)
application, close_app_func = inginious.frontend.app.get_app(config)

# Init logging
init_logging(config.get('log_level', 'INFO'))
logging.getLogger("inginious.webapp").info("http://%s:%d/" % (host, int(port)))

application, close_app_func = inginious.frontend.app.get_app(config)

if 'SERVER_SOFTWARE' in os.environ: # cgi
os.environ['FCGI_FORCE_CGI'] = 'Y'

Expand Down
4 changes: 2 additions & 2 deletions inginious-webdav
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@ if not configfile:

# Load configuration and application (!!! For mod_wsgi, application identifier must be present)
config = load_json_or_yaml(configfile)
application = inginious.frontend.webdav.get_app(config)

# Init logging
init_logging(config.get('log_level', 'INFO'))
logging.getLogger("inginious.webdav").info("http://%s:%d/" % (host, int(port)))
application = inginious.frontend.webdav.get_app(config)


if 'SERVER_SOFTWARE' in os.environ: # cgi
os.environ['FCGI_FORCE_CGI'] = 'Y'
Expand Down

0 comments on commit 161d4a5

Please sign in to comment.