如何在日志记录中包含 python django 的起始消息

时间:2021-02-09 00:54:33

标签: python django logging

在测试中,我发现Python Django应用程序的启动消息可能包含重要警告等,请参见下面的屏幕截图示例。但是,日志文件没有包含这些消息。

我想知道是否有任何设置可以将其包含在日志记录中?任何提示将不胜感激。

示例屏幕输出:

(venv3.7) [user@vnl1916 APPLICATION]$ python manage.py runserver 0.0.0.0:8000
Performing system checks...

System check identified some issues:

WARNINGS:
eav.Value.value_bool: (fields.W903) NullBooleanField is deprecated. Support for it (except in historical migrations) will be removed in Django 4.0.
        HINT: Use BooleanField(null=True) instead.

System check identified 1 issue (0 silenced).

You have 13 unapplied migration(s). Your project may not work properly until you apply the migrations for app(s): admin, auth, authtoken, ebackendapp, sites.
Run 'python manage.py migrate' to apply them.
February 08, 2021 - 12:31:55
Django version 3.1.4, using settings 'ebackendproject.settings'
Starting development server at http://0.0.0.0:8000/
Quit the server with CONTROL-C.
^C(venv3.7) [user@vnl1916 APPLICATION]$

0 个答案:

没有答案
相关问题