无法打印/查看日志(Google工作表) [英] Unable to print/view the log (google sheet)

查看:78
本文介绍了无法打印/查看日志(Google工作表)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在调试Google表格的脚本,并且尝试打印以记录以下内容:

I am debugging a script for google sheet and I am trying to print to log as follow:

Logger.log(某些txt");

Logger.log("some txt");

当我执行查看->日志"时,没有日志(此编辑器会话中未运行任何功能.").这是旧的代码,它用于写入该日志没有问题.另一方面,如果我进入查看-> Stackdrive日志记录",则可以看到日志.看来日志已重定向到该stackfrive日志,而不是普通日志.

When I do "View -> Log" there is no log ("No functions have been run in this editor session."). This is old code and it used to write to that log no problem. On the other hand, I can see the log if I go "View -> Stackdrive logging". It looks like the log is redirected to this stackfrive logging instead of the normal log.

如何查看普通日志中的日志,即查看->日志".

How do I see the log in the normal log, that is "View -> Log".

谢谢.

推荐答案

这取决于函数在哪里运行.

It depends where the function is running.

如果您正在执行查看->日志",那么它将仅显示您在当前环境中运行的内容,即,如果单击了运行功能按钮.但是,如果您的功能是在文档",电子表格"或其他文件中触发的,则不会显示该功能.因此,查看->日志"受到限制.

If you are doing "View -> Log" then it will only show what you ran within the current environment, ie if you clicked on the run function button. But if your function is triggered in the Document, Spreadsheet, or other, then it will not be displayed. So the "View --> Log" is limited.

Stackdriver-Logging,则记录来自所有环境的所有活动.

Stackdriver-Logging on the other hand, logs all the activity from all the environments.

这篇关于无法打印/查看日志(Google工作表)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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