i8beef / HomeAutio.Mqtt.GoogleHome

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Debug logging for google request and response

glsf91 opened this issue · comments

If something is not working it will be helpfull to log the complete request and complete response from the incoming google requests (Intents).
With this logging I hopefully can determine what I did wrong. This makes it also easier to see mistakes in de value mapping.
You also get a better understanding of the Google trait documentation (because you can see what is really coming and going from/to Google).

(I did this locally in the GoogleHomeController.cs)

Coming in a future version. I actually have the changes made to auto spit the incoming request body / response in logs (you just have to enable Trace as minimum level), I just need to get it into a releas.

Just released a new version that should allow this. If you set the log level in the config file now to "Verbose" you will get a lot of new logs, and among them will be ones formatted like:

Http Request Body: {...}
Http Response: {...}

I do not recommend leaving it in verbose mode outside of testing, as its going to be a lot of logs. You will need to restart the app to get the config changes.

Thanks. Maybe add this also to the configuration page (using Verbose).
It is working fine but a lot of other logging is also visible. It is difficult to find between everything. Debug and Verbose is hardly useful for a user, more for a developer.
Would it not be possible to toggle this on and off with the Information level?
I think this google request and response can be very useful for an user when having problems with a trait.

Added. https://github.com/i8beef/HomeAutio.Mqtt.GoogleHome/wiki/Logging

If you have any suggestions for additional docs let me know.

Closing as fixed.