Google Apps脚本日志(网络应用程序)未显示在新界面中 [英] Google Apps Script logs (web app) don't show up in the new interface

查看:58
本文介绍了Google Apps脚本日志(网络应用程序)未显示在新界面中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Apps Script最近已将StackDriver日志移至 Apps脚本仪表板的执行"页面.

Apps Script has recently moved the StackDriver logs into the Apps Script dashboard, page 'Execution'.

问题是,日志不会显示在Apps Script Web应用程序的仪表板中.当我向Apps Script Web应用程序发出请求时,我可以看到新的执行行,但是该行不会展开以显示日志.

Problem is, the logs won't show up in the dashboard for Apps Script web apps. I can see the new execution line when I do a request to the Apps Script web app, but the line won't expand to show the logs.

我正在使用Stackdriver Logging:

I'm using the Stackdriver Logging:

function doPost(e) {
  console.info('my log');
}

奇怪的是,当我调用dev URL(部署列标记为"Head")时,它可以工作,单击该行并可以看到日志,但是对于完全相同的应用程序,它却无法工作当我调用以/exec结尾的生产网址时(部署列标记为版本2").

Curiously, it works when I call the dev url (Deployment column is tagged as 'Head'), the line does expend when I click on it and I can see the logs, but for the exact same application it does not work when I call the production url ending with /exec (Deployment column is tagged as 'Version 2').

此外,它适用于GET请求,但不适用于POST请求.

Also, it works with GET requests, but not with POST requests.

已使用以下权限部署了Web应用:

The web app is deployed with the permissions below:

  • 以我"身份执行该应用
  • 谁可以访问该应用:谁都可以,甚至是匿名的
  • 云端硬盘共享设置:只有特定的人可以访问

这是他们新界面中的错误还是我错过了一些东西?

Is it a bug in their new interface or am I missing something?

推荐答案

我能够通过在 https://console.cloud.google.com ,然后将Apps脚本与该新项目相关联.

I was able to work around this issue by creating a Cloud Console project at https://console.cloud.google.com and associating the Apps Script with that new project.

跳过设置OAuth同意屏幕并重新授权脚本的必要步骤之后,我可以在Cloud Console的日志记录部分中查看来自匿名请求的日志.

After jumping through the required hoops of setting up an OAuth Consent screen and re-authorizing the script, I am able to see logs from anonymous requests in the logging section of the Cloud Console.

这篇关于Google Apps脚本日志(网络应用程序)未显示在新界面中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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