-
Notifications
You must be signed in to change notification settings - Fork 50
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
Improve Logs readability #39
Comments
Another possibility woudl be to mark |
Agree that this is another possibility. Personally, I think it would be great if all log messages (debug, info, warn, error) coming from the smart-home nodejs client library worked well with firebase cloud functions, or any other log console for that matter. Making the loggers configurable makes this possible without requiring client applications to add additional log messages to obtain information that is already reported by the smart-home nodejs client library. I just filed this issue and the associated PR @ actions-on-google-nodejs for one possible approach. |
In the shorterm, may be we should just turn |
Obsolete at this point. |
In the codelab documentation at https://codelabs.developers.google.com/codelabs/smarthome-washer/#5, the log for a smarthome request shows an “info” log with the details of the Request object as shown below:
However, when running the codelab, the request object is not shown:
Digging into the code, it appears that option “debug” must be enabled when instantiating smarthome, as shown below:
const app = smarthome({ debug: true });
However, after this is done, one will quickly notice readability issues of the log entries. Unfortunately, one log message appears with multiple log entries as shown below:
This appears to be caused by the fact that the smarthome node.js client library (actions-on-goole-nodejs) uses console.log(). These readability issues are mentioned in the Cloud Functions documentation “Write and view logs”. It is suggested the following:
The codelab does not use console.log() so this does not apply here. Rather, it is the use of console.log() in the node.js client library that is the issue.
Given that, would be great to do the following:
The text was updated successfully, but these errors were encountered: