【发布时间】:2020-06-04 02:27:21
【问题描述】:
我有一个在 Heroku 上运行的 Django 应用程序,其排水管将日志发送到我的 Timber.io 源。
目前,我的 Timber.io 日志显示:
- 我写在我的应用程序中显示的日志(我想要的)
-
app日志 -
heroku日志
Here is a link to what a section of my Timber.io logs look like. 注意有app web.1 和heroku router 日志。
除了我在 Django 应用程序中编写的日志之外,我不想要任何其他日志。
Django 代码:
logger = logging.getLogger(__name__)
logger.setLevel(logging.INFO)
timber_handler = timber.TimberHandler(
source_id=config('TIMBER_SOURCE_ID'),
api_key=config('TIMBER_API_KEY'),
level=logging.DEBUG
)
logger.addHandler(timber_handler)
...
logger.warning('A user has navigated to the homepage') # To reiterate, logs like this are all I want to display in my Timber.io logs.
我已向 Timber.io 的支持电子邮件发送了几封提出此问题的电子邮件。但是,一周后,我还没有收到回复。
这是我的第一个问题,如果我做错了什么,我深表歉意。提前感谢您的回复。
【问题讨论】: