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

Introduce logging to enable detailed debugging #8

Open
atsukoba opened this issue Apr 5, 2020 · 2 comments
Open

Introduce logging to enable detailed debugging #8

atsukoba opened this issue Apr 5, 2020 · 2 comments

Comments

@atsukoba
Copy link
Contributor

atsukoba commented Apr 5, 2020

By introducing logging, facilitate debugging when using as a module. Adding the argument of verbosity to each function produced by this module, users will be able to check errors occurred in internal modules such as hidapi

for example,

from pyjoycon import device
from pyjoycon.joycon import JoyCon

ids = device.get_ids("R", verbose=True)
joycon = JoyCon(*ids, verbose=True)
joycon.get_status(verbose=True)
@tocoteron
Copy link
Owner

It's nice idea.
We will implement this option.

@pbsds
Copy link
Contributor

pbsds commented Mar 21, 2021

The more pythonic solution would most likely be using logging:

import logging
logging.getLogger("pyjoycon").setLevel(logging.DEBUG)

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

No branches or pull requests

3 participants