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

Log Debug output Timestamp PR252 #256

Open
Kolbi opened this issue Mar 6, 2024 · 5 comments
Open

Log Debug output Timestamp PR252 #256

Kolbi opened this issue Mar 6, 2024 · 5 comments
Labels
enhancement New feature or request

Comments

@Kolbi
Copy link
Contributor

Kolbi commented Mar 6, 2024

Bug introduced by PR: #252

The output in the log for Timestamp looks for example:
'carCapturedTimestamp': datetime.datetime(2024, 3, 5, 13, 35, 51, tzinfo=datetime.timezone.utc),

This cases issues if you try to verify the json with tools like https://jsonformatter.curiousconcept.com/

@cdnninja
Copy link
Collaborator

cdnninja commented Mar 6, 2024

I'm confused. This is just raw response from the api. If you disable debug this output with disappear from logs.

@t0bias-r
Copy link
Contributor

t0bias-r commented Mar 7, 2024

@Kolbi I agree. The timestamp is not a valid Json item, but this is how the Audi servers send them.

@Kolbi
Copy link
Contributor Author

Kolbi commented Mar 7, 2024

Funny. :) Normally Audi should fix this on their side,

I'm thinking if it would be helpful for us to convert timestamps before LOGGER.debug...

https://github.com/arjenvrh/audi_connect_ha/blob/8065ff79c462e7daead19338a12f54b08b45f430/custom_components/audiconnect/audi_services.py#L198

@coreywillwhat
Copy link
Contributor

coreywillwhat commented Apr 8, 2024

I think its good to have the raw values at the debug level. It may be useful to have them at the info level in a more cleaned up data structure for easy reading.

Logs could use a lot more cleaning up/additions for better insight into whats happening though.

edit: learned the hard way info is not for custom component info lol

@coreywillwhat
Copy link
Contributor

coreywillwhat commented Apr 16, 2024

Also, I couldn't agree more @Kolbi I'm losing my mind removing or quoting the datetime.datetime(xxx) data so i can see it in a readable format. A raw format debug, and a formatted debug, would be really nice.

@coreywillwhat coreywillwhat added the enhancement New feature or request label Apr 17, 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

4 participants