actions-on-google / actions-on-google-nodejs

Node.js client library for Actions on Google
https://actions-on-google.github.io/actions-on-google-nodejs
Apache License 2.0
900 stars 197 forks source link

Support configuring loggers as described in issue #413 #414

Closed pierredelisle closed 8 months ago

pierredelisle commented 3 years ago

(https://github.com/actions-on-google/actions-on-google-nodejs/issues/413).

With that change, a client application that uses Firebase cloud functions would simply need to do the following to improve substantially the readability of log entries in the cloud functions logs console:

const app = smarthome({   debug: true,   logs: {     debug: functions.logger.debug,     info: functions.logger.info,     // 'warn' maps to 'error' in firebase logs.     // If set to functions.logger.warn, there is no level associated with the log entry.     warn: functions.logger.error,     error: functions.logger.error   } });

Fleker commented 3 years ago

You may be interested in looking at a similar commit done to the assistant/conversation lib