Skip to content

Use debug logging level #159

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

Merged
merged 1 commit into from
Aug 9, 2022
Merged

Use debug logging level #159

merged 1 commit into from
Aug 9, 2022

Conversation

seakrueger
Copy link
Contributor

Read and write calls resulted in lots of spam to the info level logging, despite the information being logged not providing much info more debug positions.

blurrylogexample

@chrisruk
Copy link
Contributor

chrisruk commented Aug 8, 2022

Thanks for this pull request, I'm just wondering where you saw those info messages in your screenshot?

@seakrueger
Copy link
Contributor Author

seakrueger commented Aug 9, 2022

That specific screenshots originated from the journal (that's why there's two timestamps). The program defines its own loggers basic config,
logging.basicConfig(format='%(asctime)s - %(message)s', level=logging.INFO).

The actual motor code that results in the 40ms of logging is pretty simple,

def button_one(self):
        self.motor_b.start()

        self.wait()

        self.motor_b.stop()

self.wait() being just a simple sleep

Copy link
Contributor

@chrisruk chrisruk left a comment

Choose a reason for hiding this comment

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

Using debug level rather than info level seems a good idea, as the information
being logged is for debugging purposes.

@chrisruk chrisruk merged commit 2d84f52 into RaspberryPiFoundation:main Aug 9, 2022
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