Google App Engine-日志的可靠性如何? [英] Google App Engine - How reliable are the logs?

查看:44
本文介绍了Google App Engine-日志的可靠性如何?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Google App Engine日志的可靠性如何?

How reliable are the Google App Engine logs?

因为日志针对写入速度进行了优化,而数据存储针对读取速度进行了优化,所以我正在考虑通过将一些数据写入日志而不是将其写入数据存储来存储一些数据.

Because logs are optimized for write speed, and the datastore is optimized for read speed, I'm thinking about storing some data by writing it to the logs rather than writing it to the datastore.

如果我调用 Logger.info("something"); ,并且调用成功,该日志条目肯定会显示在日志中吗?还是有时会默默地失败?

If I call Logger.info("something");, and the call succeeds, will that log entry definitely show up in the logs? Or will it sometimes silently fail?

大约每隔一小时,我就会让我的家用计算机下载日志以将数据保留在我的家用计算机上.

About every hour I'll have my home computer download the logs to persist the data on my home computer.

推荐答案

虽然不太可能,但是可能调用可能会以静默方式失败,因为日志是异步写入的(否则就不会很快).如果需要可靠性,请使用任务队列

Although it's very unlikely, it's possible the call could silently fail, because logs are written asynchronously (or else they wouldn't be so fast). If you need reliability, using the task queue or deferred to insert a datastore entity might be a better option.

这篇关于Google App Engine-日志的可靠性如何?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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