Skip to content

Instantly share code, notes, and snippets.

View waryak's full-sized avatar
🎓
MLE@X5RG & CS student@HSE

Vladislav waryak

🎓
MLE@X5RG & CS student@HSE
  • NRNU MEPhI
  • Moscow
View GitHub Profile
@amgorb
amgorb / uwsgi.conf
Created April 11, 2018 16:37
uWSGI separate JSON logging for application compatible with Elasticsearch
[uwsgi]
;this will encode uwsgi messages into JSON, encode requests to JSON and leave application output unchanged
;if this output from application has msgName string
logger = default stdio
logger = secondlogger stdio
log-route = secondlogger msgName
log-route = default ^((?!msgName).)*$
log-encoder = json:default {"@timestamp":"${strftime:%%Y-%%m-%%dT%%H:%%M:%%S.666Z}","source":"uwsgi", "message":"${msg}"}