(Executing arbitrary code on a production server is debugging in production.

Logging (additional information added to exceptions with 'raise _ from _`)
may assist with root cause analysis and debugging on a different instance
but IMHO logging is not debugging.)

On Fri, Sep 25, 2020, 5:18 PM Chris Angelico <ros...@gmail.com> wrote:

> On Sat, Sep 26, 2020 at 7:05 AM Wes Turner <wes.tur...@gmail.com> wrote:
> >> "Well, if I get an import error, I can add some more directories to
> >> sys.path and try adding the values again, that might fix it..."
> >>
> >> Who does that? Not me. And I bet you don't either.
> >
> >
> > "Defensive programming" / "Offensive programming"
> > https://en.wikipedia.org/wiki/Defensive_programming
>
> Do you plan for every possible exception from every possible line of
> code? Really? Okay, show me something that catches ImportError from
> "import math" then. What's in your except clause?
>
> > While there are plenty of ways to debug in production,
> > debugging in production is a bad idea and is not allowed (because: __,
> __, __) :
> > log the exception with necessary details (traceback, exception attrs,
> <full stack frame>) but exclude sensitive information that shouldn't be
> leaking into the logging system.
> >
>
> That IS debugging in production. I don't understand why you say that
> that's a bad thing.
>
> ChrisA
> _______________________________________________
> Python-ideas mailing list -- python-ideas@python.org
> To unsubscribe send an email to python-ideas-le...@python.org
> https://mail.python.org/mailman3/lists/python-ideas.python.org/
> Message archived at
> https://mail.python.org/archives/list/python-ideas@python.org/message/PYQ6KWUGIVRH4BSDGAA2JLBCVBSTLKSJ/
> Code of Conduct: http://python.org/psf/codeofconduct/
>
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/Y46CYIII6YMMHNLGCV4MTO3Q7OANMTVG/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to