【发布时间】:2022-06-13 20:00:29
【问题描述】:
BetterLog Apps Script library 将每条消息打印到Google Apps Script console 两次。
是否可以以某种方式配置它或者它是一个错误?
我使用the library's page推荐的标准配置:
// Add one line to use BetterLog
Logger = BetterLog.useSpreadsheet('your-spreadsheet-key-goes-here');
//Now you can log and it will also log to the spreadsheet
Logger.log("That's all you need to do");
带有重复消息的控制台日志示例:
11:23:10 AM Info 2022-06-13 11:23:10:821 +0300 001169 INFO doPost called
11:23:10 AM Info doPost called
11:23:11 AM Info 2022-06-13 11:23:11:289 +0300 001637 INFO doPost - contents: {"message":{"chat":{"id":123},"text":"/test"}}; runFromChatId: 123; text: /test
11:23:11 AM Info doPost - contents: {"message":{"chat":{"id":123},"text":"/test"}}; runFromChatId: 123; text: /test
11:23:11 AM Info 2022-06-13 11:23:11:599 +0300 001947 INFO doPost - not yet validated runFromChatId: 123
11:23:11 AM Info doPost - not yet validated runFromChatId: 123
11:23:11 AM Info 2022-06-13 11:23:11:893 +0300 002241 INFO doPost - authFailedAmount: 0
11:23:11 AM Info doPost - authFailedAmount: 0
...
【问题讨论】:
标签: javascript google-apps-script logging