我在哪里可以看到在我的Google Action履行功能中记录的console.log消息,或者如何简单地记录调试记录文本? [英] Where can I see console.log messages logged in my Google Action fulfillment function or how can I simply log debug logging text?

本文介绍了我在哪里可以看到在我的Google Action履行功能中记录的console.log消息,或者如何简单地记录调试记录文本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在制定一项使用成就的行动.我正在使用内联编辑器.我将硬编码的值移到FireStore中,因此数据存储在函数本身中. FireStore请求没有按预期进行:尽管实现调用没有失败,但是它没有找到应有的信息.我正在尝试使用旧的console.log类型日志记录来尝试找出问题所在.但是这些日志消息不会显示在任何地方.

I'm developing an action which uses fulfillment. I'm using the Inline Editor. I'm moving hard coded values into FireStore so data is stored inside the function itself. The FireStore request don't go as intended: although the fulfillment call doesn't fail it doesn't find the information it supposed to. I'm trying the good old console.log type logging to try to figure out what goes wrong. But those log messages don't show anywhere.

我查看了该功能的Firebase日志,但其中仅包含基本事件:执行开始,完成和警告.

I looked at the Function's Firebase log, but it only contains basic events: execution started, finished, and a warning.

我还通过将操作附加到已计划付款的项目来升级该操作,并启用了Stackdriver日志记录.那也没有显示我的自定义日志记录,仅显示样板消息.

I also upgraded the action by attaching it to a payment planned project, and enabled Stackdriver logging. That also did not display my custom logging, only boilerplate messages.

然后,我尝试按照以下步骤将自定义Stackdriver登录添加到内联实现功能中:

Then I tried to add custom Stackdriver logging into the Inline fulfillment function following this: https://firebase.google.com/docs/functions/writing-and-viewing-logs But I get an error because the @google-cloud/logging is not accessible in the nodejs environment of that inline function. So I'm kinda stuck. I cannot believe there's no easy way to simply log, but multiple Google searches didn't yield anything usable I could act on.

推荐答案

如果有人正在寻找日志,但未使用内联编辑器,则可以在Firebase控制台中找到它们:

In case anyone is looking for the logs but are NOT using the inline editor, you can find them in your firebase console: https://console.firebase.google.com/

这篇关于我在哪里可以看到在我的Google Action履行功能中记录的console.log消息,或者如何简单地记录调试记录文本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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