unbit / uwsgi-docs

Official uWSGI docs, examples, tutorials, tips and tricks
MIT License
640 stars 346 forks source link

Default logformat is missing some parameters #497

Open madmaze opened 3 years ago

madmaze commented 3 years ago

Ref: https://github.com/unbit/uwsgi-docs/blob/master/LogFormat.rst#uwsgi-default-logging

log-format = [pid: %(pid)|app: -|req: -/-] %(addr) (%(user)) {%(vars) vars in %(pktsize) bytes} [%(ctime)] %(method) %(uri) => generated %(rsize) bytes in %(msecs) msecs (%(proto) %(status)) %(headers) headers in %(hsize) bytes (%(switches) switches on core %(core))

The app/req parameter variables are not filled in [pid: %(pid)|app: -|req: -/-]

Are these parameters not supported when providing a custom log format?

It looks like internally we use a different formatting method, which does not use the variable/functions referenced in the docs.