Google App Engine为什么某些日志没有显示? [英] Google App Engine why some Logs are not getting shown?

查看:108
本文介绍了Google App Engine为什么某些日志没有显示?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Google App Engine灵活环境中,许多日志正在跳过,并且未在日志记录控制台中显示,并且它一直在发生,我正在Google Cloud信息中心的Stackdriver Logging部分中对其进行检查,我正在使用console.log()被跳过,但mongoose查询日志正在打印.

In Google App Engine Flexible environment many Logs are skipping, and not getting shown in the Logging console, and it is happening always, I am checking it on Stackdriver Logging section on Google Cloud dashboard, the Logs I am showing using console.log() are getting skipped but mongoose query logs are getting printed.

此外,现在有时会显示我的日志console.logs,但有时不会,但是以前每次都会显示它们.为什么现在每次都无法正常工作?

Also, now currently sometimes my logs console.logs are getting shown but sometimes not, but previously they were getting shown every time. Why now is it not working every time?

有人可以告诉我为什么会这样吗?

Can anyone please tell me why is this happening?

谢谢

修改-

我添加了调试点,但问题是我的调试点是 已执行,但是如何在未打印的日志中找到它们?

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?

此外,我在计算引擎上使用了相同的代码,但其中记录了所有内容 日志正在打印,但是在某些情况下,在App Engine中,它们是 缺少传送时间?

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?

推荐答案

之所以发生此问题,是因为

The problem was happening because there is some compatibility issue between 0x and App engine, I was using 0x in start script like this 0x server.js

所以,我的server.js文件带有0x,这就是为什么我认为它在跟踪代理之前已加载,这就是为什么我猜错了的原因.

So, my server.js file with 0x that's why I think it was getting loaded before trace agent, and that's why the error was there I guess.

我之前遇到了以下错误,我在此线程中也分别提出了

I was getting below error previously which I have also asked separately in this thread here

错误:@ google-cloud/trace-agent:TraceAgent#start:跟踪可能无法工作,因为在初始化跟踪代理之前已加载以下模块:[0x]

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出现问题,但是问题是,当我删除了该模块并从开始脚本中解决了该问题之后.

But I just thought it will not cause issues for Google Cloud Logging, but the thing is when I removed this module and from the start script the issue was resolved.

我认为

Google必须更改此错误,并且还应提及Google Cloud Logging 错误,否则,如果有人也在使用0x 使用应用程序引擎,他们还将面临解决此类错误的问题.

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.

这篇关于Google App Engine为什么某些日志没有显示?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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