记录日志是否算作数据存储写操作?

huangapple go评论83阅读模式
英文:

Does logging count as a datastore write operation

问题

尝试找出导致我的应用程序超过免费写入配额的原因。我唯一能想到的是我们在写入的同时进行了日志记录,这是否算作写操作:

func CheckHistory(w http.ResponseWriter, r *http.Request) {
    ...
    c.Infof("一些日志内容")
}

请注意,这是一个示例代码片段,其中的 c.Infof 可能会导致写入操作。

英文:

Trying to work out what is causing my app to go over the free write quota. The only thing I can think of is we are logging along site of writing, i.e. Does this count as a write operation:

func CheckHistory(w http.ResponseWriter, r *http.Request) {
    ...
   c.Infof("Some log stuff")
}

答案1

得分: 1

快速回答是不行的。write 只是将数据写入数据存储器。

现在来尝试解决你的问题...你是不是一直超过索引写入配额?如果你在构建索引时不小心,这可能会很麻烦。据我所知,并且根据这里所说,你的日志没有任何写入的原因。

英文:

Quick answer is no. Write is only write to datastore.

Now to try and fix your problem.... Is it the index write quota you keep on busting? this can easily get problematic if you're not careful with how you build your indexes. Because as far as I know, and as far as is told here, no reason for your logs to take any kind of write.

huangapple
  • 本文由 发表于 2014年8月26日 07:20:58
  • 转载请务必保留本文链接:https://go.coder-hub.com/25495770.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定