F
F
FulTupFul2019-03-03 23:44:59
Python
FulTupFul, 2019-03-03 23:44:59

What is the best way to log a web application in Python?

Actually the question is in the title. I set out to fully secure my application in order to track visitor statistics and control situations like ddos, brute force, etc. But what is the best way to do this? To begin with, I chose the json format and started tracking a fairly large number of parameters, but the log, using standard uwsgi tools, grew quite quickly in volumes up to 300mb, and it became simply impossible to keep statistics on it. And a bunch of other problems, for example, how to measure the execution time of a request, whether it is possible to store post request arguments in the logs in case an error occurs, on the server, because they can contain sensitive data like inn or snls. I want to hear your best cases and best practices

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Andrew, 2019-03-04
@FulTupFul

Sentry.io

  • integrating with the Python ecosystem
  • manual error and event capturing
  • configuration options
  • adding context (tags, user and extra information)
  • tracing issues with breadcrumbs
  • capturing user feedback on crashes

D
Dmitry Shitskov, 2019-03-04
@Zarom

graylog

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question