Why does Logger.log statements not show up in Logs?

我是研究僧i 提交于 2020-12-15 19:31:11

问题


I've just transitioned to V8 of google apps script. I'm updating my previous scripts. all of my Logger.log("Hello World"); statements behave differently. Previously i could hit ctrl+enter which would bring up the "Logs" screen. Currently those logger statements don't show up there and I get a message that "No Functions have been run in this editor session". I am able to open the executions screen and find the Logger statements there. The problem with that few is it only time stamps to the second. Previously the "Logs" screen would time stamp down to the 1000th of a second.


回答1:


Apparently this is a change and is working as it's supposed to. Only Script run directly from the editor will go into the "Logs" screen and all others (such as triggering a script from a google sheet) must be tracked in executions. If scripts are run directly from the editor they do show up in the "Logs" Screen and this does still timestamp down to 1/1000th of a second. Items tracked in the executions screen are limited to every second which is also an intended behavior at this time.



来源:https://stackoverflow.com/questions/64305032/why-does-logger-log-statements-not-show-up-in-logs

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!