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

Remove log handler in __init__.py #71

Closed
Poofjunior opened this issue Aug 16, 2023 · 2 comments · Fixed by #73
Closed

Remove log handler in __init__.py #71

Poofjunior opened this issue Aug 16, 2023 · 2 comments · Fixed by #73
Assignees

Comments

@Poofjunior
Copy link
Contributor

Poofjunior commented Aug 16, 2023

Calling basicConfig in the init.py here has the effect of also adding aStreamHandler. This compels any python script/package/etc. that imports this package to print logs to stdout by default unless they explicitly remove this handler.

For python libraries, the convention is to add a named logger but no handlers (See notes 1 and 2 in Configuring Logging for a Library. Logs are certainly useful, so for development I would recommend calling basicConfig at the top of each test script where you want to see the output instead but not in the package.

Related: #37

@nclack
Copy link
Member

nclack commented Aug 16, 2023

good catch. Thanks.

@nclack
Copy link
Member

nclack commented Aug 16, 2023

I'm going to handle this in two parts. We can take the logger out now. I'll add the logging back to the tests in a follow up issue.

@aliddell aliddell moved this from Backlog to In Progress in Image Acquisition Team Board Aug 16, 2023
nclack added a commit that referenced this issue Aug 21, 2023
closes #71 

I also unexpectedly ran into rust complaining about a misaligned pointer
read. So I fixed that. I can't quite figure out why it manifested now,
but it was quite repeatable.
@github-project-automation github-project-automation bot moved this from In Progress to Complete in Image Acquisition Team Board Aug 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
2 participants