如何从postgres关闭Heroku SQL日志 [英] how to turn off Heroku SQL logs from postgres

查看:157
本文介绍了如何从postgres关闭Heroku SQL日志的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Heroku上运行一个使用postgres的应用程序。



我所有的SQL语句都在我的日志中显示;

他们看起来像这样:

  Dec 03 05:41:36 ti-core app / postgres:[1566-2]#011FROM别名
Dec 03 05:41:36 ti-core app / postgres:[1566-3]#011WHERE alias.nid = E'10.5334 / sta.at'AND alias.namespace = E'doi'
Dec 03 05:41:36 ti-core app / postgres:[1566-4]#011 LIMIT 1

我无法弄清楚我在哪里设置了这个级别的heroku postgres调试以及将它关闭的位置一个缺口。谢谢!

解决方案

我知道这可能不是正确的答案,但我用下面的命令解决了部分问题(至少在何时我正在实时阅读日志):

heroku logs --tail | grep -v'执行'



其中 -v 参数反转grep搜索,因此只显示其他日志消息(假设他们的内容中没有执行文本)。



我希望这有助于。

I'm running an application on Heroku that uses postgres.

All of my SQL statements are coming through in my logs; I'd like to turn this off.

They look like this:

Dec 03 05:41:36 ti-core app/postgres:  [1566-2] #011FROM alias  
Dec 03 05:41:36 ti-core app/postgres:  [1566-3] #011WHERE alias.nid = E'10.5334/sta.at' AND alias.namespace = E'doi'  
Dec 03 05:41:36 ti-core app/postgres:  [1566-4] #011 LIMIT 1

I can't figure out where I've set this level of heroku postgres debugging and where to turn it down a notch. Thanks!

解决方案

I know this is probably not the right answer but I solved partially the problem with the following command (at least when I am reading logs in real time):

heroku logs --tail | grep -v 'Executing'

where the -v parameter inverts the grep search, so that only other log messages are shown (assuming they don't have the text 'Executing' in their content).

I hope this helps.

这篇关于如何从postgres关闭Heroku SQL日志的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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