【问题标题】:Django-Python log error on MS Azure web appMS Azure Web 应用程序上的 Django-Python 日志错误
【发布时间】:2021-08-14 17:49:46
【问题描述】:

下午好,

我们在 MS Azure(应用服务)上部署了一个 Django Web 应用。

我们无法使用 shell(local-cmd 或仪表板上的 MS Azure shell,同样的错误)正确打开 Web App 的日志流。

这里尝试在 Azure 仪表板上打开日志流:

user@Azure:~$ az webapp log tail --resource-group  OUR_RESOURCES_GROUP --name OUR_WEB_APP_NAME
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/opt/az/lib/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "/opt/az/lib/python3.6/threading.py", line 864, in run
    self._target(*self._args, **self._kwargs)
  File "/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/appservice/custom.py", line 2345, in _get_log
    .decode(std_encoding, errors='replace'), end='')  # each line of log has CRLF.
  File "/opt/az/lib/python3.6/logging/__init__.py", line 1320, in warning
    self._log(WARNING, msg, args, **kwargs)
TypeError: _log() got an unexpected keyword argument 'end'

微软支持告诉我们这是一个配置问题,但我们检查了几次python版本和其他几个配置。

有人可以帮忙吗?谢谢

【问题讨论】:

  • 网站基于线程概念?
  • 线程概念是什么意思?该网站使用了 django 引擎。

标签: python django azure stream


【解决方案1】:

这似乎是 Azure CLI 的问题,这里是 Github 问题的链接https://github.com/Azure/azure-cli/issues/18073

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2023-03-17
    • 1970-01-01
    • 2023-03-29
    • 2017-09-12
    • 2023-04-08
    • 2023-04-10
    • 2014-10-13
    • 1970-01-01
    相关资源
    最近更新 更多