Google App Engine 为什么有些日志没有显示?

Google App Engine why some Logs are not getting shown?

在 Google App Engine Flexible 环境中,许多日志被跳过,并且没有显示在日志记录控制台中,而且它总是发生,我正在 [=28] 的 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 云日志记录出现问题,但问题是当我删除此模块并从启动脚本中解决问题时。

嗯我觉得

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.

如果您认为这是一个兼容性问题,那么您可以转到我们的 Issue Tracker 并打开一个功能请求来修复它。请提供有关 0x 模块的所有详细信息,以便我们找出它不起作用的原因。