Skip to content

Use the python logger in the API instead of print statements#726

Merged
seapagan merged 2 commits intomainfrom
add-logging
Feb 17, 2025
Merged

Use the python logger in the API instead of print statements#726
seapagan merged 2 commits intomainfrom
add-logging

Conversation

@seapagan
Copy link
Owner

@seapagan seapagan commented Feb 17, 2025

Remove all print statements from the API and replace with the relevant logger usage. The CLI still uses print for now.

We hook into the uvicorn logger so all our outputs are consistently formatted the same as those output by FastAPI

Signed-off-by: Grant Ramsay <seapagan@gmail.com>
@seapagan seapagan added the enhancement New feature or request label Feb 17, 2025
@seapagan seapagan self-assigned this Feb 17, 2025
Signed-off-by: Grant Ramsay <seapagan@gmail.com>
@seapagan seapagan marked this pull request as ready for review February 17, 2025 13:02
@seapagan seapagan merged commit c3e1b25 into main Feb 17, 2025
13 checks passed
@seapagan seapagan deleted the add-logging branch February 17, 2025 13:03
@codacy-production
Copy link

codacy-production bot commented Feb 17, 2025

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
+0.01% (target: -1.00%) 100.00%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (0affe4c) 913 906 99.23%
Head commit (70adc2f) 919 (+6) 912 (+6) 99.24% (+0.01%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#726) 17 17 100.00%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

Codacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant