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

Debug mode verbose logging #23

Closed
3 tasks done
purcell-lab opened this issue Feb 8, 2024 · 3 comments
Closed
3 tasks done

Debug mode verbose logging #23

purcell-lab opened this issue Feb 8, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@purcell-lab
Copy link
Contributor

Checklist

  • I have filled out the issue template to the best of my ability.
  • This issue only contains 1 issue (if you have multiple issues, open one issue for each issue).
  • This issue is not a duplicate issue of any previous issues..

Describe the issue

When the integration is switched to Debug mode the logging should be more verbose.

It would be useful to log which endpoints are queried and the results returned, sensitive data (keys) should be redacted.

Reproduction steps

Enable integration debug mode.

image

Debug logs

2024-02-08 21:51:47.996 DEBUG (MainThread) [custom_components.teslemetry] Finished fetching Teslemetry Vehicle data in 0.312 seconds (success: True)
2024-02-08 21:51:50.936 DEBUG (MainThread) [custom_components.teslemetry] Finished fetching Teslemetry Vehicle data in 0.319 seconds (success: True)
2024-02-08 21:51:51.099 DEBUG (MainThread) [custom_components.teslemetry] Finished fetching Teslemetry Energy Site Live data in 0.736 seconds (success: True)
2024-02-08 21:51:51.941 DEBUG (MainThread) [custom_components.teslemetry] Finished fetching Teslemetry Energy Site Info data in 0.276 seconds (success: True)
2024-02-08 21:52:18.026 DEBUG (MainThread) [custom_components.teslemetry] Finished fetching Teslemetry Vehicle data in 0.343 seconds (success: True)
2024-02-08 21:52:20.886 DEBUG (MainThread) [custom_components.teslemetry] Finished fetching Teslemetry Vehicle data in 0.268 seconds (success: True)
2024-02-08 21:52:21.690 DEBUG (MainThread) [custom_components.teslemetry] Finished fetching Teslemetry Energy Site Live data in 1.326 seconds (success: True)
@Bre77 Bre77 added the enhancement New feature or request label Feb 8, 2024
@Bre77
Copy link
Contributor

Bre77 commented Feb 8, 2024

This will be an enhancement on https://github.com/Teslemetry/python-tesla-fleet-api, rather than the Home Assistant integration.

@purcell-lab
Copy link
Contributor Author

I"m interested in verbose logging so I can see what is going wrong with these energy controls.

Should I raise a new issue against the python library?

@Bre77
Copy link
Contributor

Bre77 commented Feb 11, 2024

No that's fine, leave it with me. The redaction part of your request is going to be the hardest part about it.

@Bre77 Bre77 closed this as completed Mar 26, 2024
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

No branches or pull requests

2 participants