I think it would be very convenient to have a user-id
in the uwsgi request/response log.
(我认为在uwsgi请求/响应日志中具有user-id
将非常方便。)
I know there's logformat
option available in uwsgi.
(我知道logformat
有可用的logformat
选项。)
And I don't think user-id
could be handled by logformat
since it's not something uwsgi natively knows, it's app (my case django)'s data that runs inside uwsgi (if that expression makes sense) (而且我认为user-id
不能由logformat
处理,因为uwsgi本身并不知道,因为它是app(在我的情况下为django)的数据在uwsgi中运行(如果该表达式有意义))
On the other hand, there's django logger's format
and I guess I could make a middleware that prints a request/response data with user-id
although this would be duplication of what uwsgi itself is logging.
(另一方面,有django logger的format
,我想我可以制作一个中间件来打印带有user-id
的请求/响应数据,尽管这将是uwsgi本身正在记录的内容的重复。)
(although uwsgi's log don't have user-id
) ((尽管uwsgi的日志没有user-id
))
So is there a way for uwsgi logformat
or similar option to take the app(django)'s data into the log?
(那么,是否有办法让uwsgi logformat
或类似的选项将应用程序(django)的数据放入日志?)
ask by eugene translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…