英文:
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.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论