python - Pass value to uWSGI from Django application
问题描述
How can I pass the request.user.username
to the uWSGI logger from Django?
I want to generate the below log:
[pid: 1|app: 0|req: 2/38] **REQUEST.USER.USERNAME**
Also, I'm using Nginx as the webserver.
解决方案
推荐阅读
- sql - 如何对 BigQuery 中的不同值进行 NTILE?
- bixby - 如何从 $user.currentLocation 获取用户的社区或城市?
- c# - 有没有办法在 C# 中派生或扩展属性?
- c# - C# 复杂类到 SQLBulkInsert 数百万或行
- azure - 使用 terraform 将角色分配添加到托管标识的多个 Azure 订阅
- c++ - GoogleTest 中不需要的跳过
- rest - 有没有办法在同一个 Here REST API V8 Routes 响应中获取摘要和折线信息?
- xamarin.forms - Xamarin Forms Shell 绑定弹出图标主题感知
- sql - SQL - 仅当没有非空的匹配记录时才返回空值记录
- sql - 如果父项处于非活动状态,Oracle 层次结构查询以排除子记录