为什么Logger.log语句未显示在日志中? [英] Why does Logger.log statements not show up in Logs?

查看:217
本文介绍了为什么Logger.log语句未显示在日志中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚过渡到Google Apps脚本的V8.我正在更新以前的脚本.我所有的Logger.log("Hello World");语句的行为都不同.以前我可以按ctrl + enter来调出"Logs"(日志).屏幕.当前,那些记录器语句未显示在此处,并且我收到一条消息此编辑器会话中未运行任何功能".我能够打开执行屏幕,并在其中找到Logger语句.很少的问题是只有时间戳到秒.以前,日志"是指屏幕将时间戳记到秒的千分之一.

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.

推荐答案

显然,这是一个更改,并且按预期工作.只有直接从编辑器运行的脚本才会进入日志"页面.屏幕和所有其他屏幕(例如从Google工作表触发脚本)必须在执行过程中进行跟踪.如果脚本是直接从编辑器运行的,则它们确实会显示在日志"窗口中.屏幕,并且它的时间戳仍然降低到1/1000秒.在执行屏幕中跟踪的项目被限制为每秒,这也是目前的预期行为.

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.

这篇关于为什么Logger.log语句未显示在日志中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆