我有以下系统配置
[Service]
WorkingDirectory=/srv/www/project_a/project_a/
Environment=JSON_SETTINGS=/srv/www/project_a/project_a.json
ExecStart=/srv/www/project_a/bin/daphne -b 0.0.0.0 -p 8000 project_a.asgi:channel_layer
Restart=always
KillSignal=SIGTERM
NotifyAccess=all
StandardOut=file:/tmp/daphne-access.log
StandardError=file:/tmp/daphne-error.log
Run Code Online (Sandbox Code Playgroud)
但是 daphne-access.log 和 daphone-error.log 文件都是空的,我认为 daphne 的默认注销会输出到 stdout 吗?
尝试过:--access-log=/tmp/daphne-access.log它适用于访问日志,但不知道在发生 django 错误时在哪里获取错误。
Öze*_* S. 13
只需将以下内容添加到您的LOGGING['loggers']设置中:
'daphne': {
'handlers': [
'console',
],
'level': 'DEBUG'
},
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
9353 次 |
| 最近记录: |