gpt4 book ai didi

node.js - Google App Engine 为什么有些日志没有显示?

转载 作者:搜寻专家 更新时间:2023-10-31 22:38:56 27 4
gpt4 key购买 nike

在 Google App Engine Flexible 环境中,许多日志被跳过,并且没有在日志记录控制台中显示,而且它总是发生,我正在 Google Cloud 仪表板的 Stackdriver Logging 部分检查它,我正在使用 console.log() 显示的日志被跳过,但正在打印 mongoose 查询日志。

此外,现在有时我的日志 console.logs 会显示,但有时不会显示,但以前每次都会显示。为什么现在不是每次都有效?

谁能告诉我为什么会这样?

谢谢

编辑-

I have added debugging points but the thing is my debug points are executed, but how come in the logs they are not getting printed?

Also, I am using the same code on compute engine but there logs all logs are getting printed, but in App Engine for some cases, they are missing eveytime?

最佳答案

问题的发生是因为 0x 之间存在一些兼容性问题和 App 引擎,我在这样的启动脚本中使用 0x 0x server.js

因此,我的 server.js 文件带有 0x,这就是我认为它在跟踪代理之前加载的原因,这就是我猜的错误在那里的原因。

我之前遇到过以下错误,我也在这个帖子中单独询问过 here

ERROR:@google-cloud/trace-agent: TraceAgent#start: Tracing might not work as the following modules were loaded before the trace agent was initialized: [0x]

但我只是认为它不会导致 Google Cloud Logging 出现问题,但问题是当我删除此模块并从启动脚本开始时问题已解决。

我觉得不错

Google must change this error and should also mention Google Cloud Logging in the error, otherwise if someone is also using 0x with app engine they will also face issues resolving these kinds of errors.

关于node.js - Google App Engine 为什么有些日志没有显示?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52065164/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com