Skip to content

Commit

Permalink
Merge pull request #33 from cmu-sei/uvicorn_logging
Browse files Browse the repository at this point in the history
Add Uvicorn logging
  • Loading branch information
sei-jbooz authored Apr 26, 2023
2 parents 7f7985f + 483f0f4 commit 9ea6629
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions gamebrain/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@
LOGLEVEL = get_settings().log_level
print(f"Got log level: {LOGLEVEL}")
logging.basicConfig(level=LOGLEVEL)
uvicorn_logger = logging.getLogger("uvicorn.access")
uvicorn_logger.setLevel(LOGLEVEL)

startup = []
shutdown = []
Expand Down
2 changes: 2 additions & 0 deletions settings.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# (Optional) One of DEBUG, INFO, WARNING, ERROR, or CRITICAL (values are in increasing order of severity).
log_level: WARNING
# (Optional) A URL path prefix for all endpoints. Default is "/gamebrain".
app_root_prefix: /
# (Optional) This is a path to a CA certificate file used to authenticate Gameboard and Topomojo. Default is null, which makes the application trust the system's default CA certificates instead.
Expand Down

0 comments on commit 9ea6629

Please sign in to comment.