Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(api): use factory function for creating app, add structlog #34

Merged
merged 14 commits into from
Nov 5, 2024

Conversation

RobertRosca
Copy link
Member

Adds logging via structlog, uses an uvicorn app factory instead of direct references to a main.app object (works better when using hot reload).

NB: should be merged to main after #33

@RobertRosca RobertRosca changed the title feat(api): use factory function for creating app feat(api): use factory function for creating app, add structlog Oct 28, 2024
Base automatically changed from fix/types-warnings to main October 29, 2024 09:24
An error occurred while trying to automatically change base from fix/types-warnings to main October 29, 2024 09:24
@RobertRosca RobertRosca force-pushed the feat/logging-app-factory branch from 86af686 to 9244367 Compare October 29, 2024 09:26
Copy link
Member

@CammilleCC CammilleCC left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks and is working great! :)

Aside from the env vars request and some questions, LGTM

api/src/damnit_api/main.py Show resolved Hide resolved
api/src/damnit_api/main.py Outdated Show resolved Hide resolved
api/src/damnit_api/main.py Outdated Show resolved Hide resolved
api/src/damnit_api/main.py Outdated Show resolved Hide resolved
api/src/damnit_api/settings.py Show resolved Hide resolved
api/src/damnit_api/logging.py Outdated Show resolved Hide resolved
@RobertRosca
Copy link
Member Author

@CammilleCC thanks for the review, addressed your comments and made a few changes, could you have a look at those as well?

@CammilleCC
Copy link
Member

LGTM x 2, thanks for the changes and clarifications!

@RobertRosca RobertRosca merged commit 3308334 into main Nov 5, 2024
@RobertRosca RobertRosca deleted the feat/logging-app-factory branch November 5, 2024 10:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants