Skip to content

Commit

Permalink
Add logging handler
Browse files Browse the repository at this point in the history
The lastResort handler is used by default. This might lead to unexpected
results because the lastResort handler has the WARNING log-level.

https://docs.python.org/3/library/logging.html#logging.lastResort
  • Loading branch information
nkaretnikov committed Dec 18, 2023
1 parent 3fe05d2 commit 23e55aa
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions conda-store-server/conda_store_server/server/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,7 @@ def start(self):
# Note: the logger needs to be defined here for the output to show
# up, self.log doesn't work here either
logger = logging.getLogger("app")
logger.addHandler(logging.StreamHandler())
logger.setLevel(self.log_level)
logger.info(f"Starting server on {self.address}:{self.port}")

Expand Down

0 comments on commit 23e55aa

Please sign in to comment.