On Wed, 9 Feb 2022 19:38:23 +, Martin Di Paola wrote:
>>> - On a line per line basis? on a function/method basis?
>
> In general I prefer logging line by line instead per function.
>
> It is easy to add a bunch of decorators to the functions and get the
> logs of all the program but I most o
? Logs are not intended to be read by end users. Logs are primarily
used to understand what the code is doing in a production environment.
They could also be used to gather metrics data.
Why should you log to give a message instead of simply using a print?
You are assuming that logs and prints
On Wed, 9 Feb 2022 at 20:40, Martin Di Paola wrote:
>
> If the logs are meant to be read by my users I log high level messages,
> specially before parts that can take a while (like the classic
> "Loading...").
? Logs are not intended to be read by end users. Logs are primarily
used to understand
- On a line per line basis? on a function/method basis?
In general I prefer logging line by line instead per function.
It is easy to add a bunch of decorators to the functions and get the
logs of all the program but I most of the time I end up with very
confusing logs.
There are exceptions,
> On 8 Feb 2022, at 14:15, Lars Liedtke wrote:
>
> Hello,
>
> inspired by this thread
> https://mail.python.org/pipermail/python-list/2022-February/905167.html I
> finally came around to send in this question.
>
> I know how to use python logging generally. Being on the DevOps-Side of
> t
These are a lot of questions. I hope we're not off topic.
I don't know if mine are best practices. I can tell what I try to do.
On Tue, 8 Feb 2022 at 15:15, Lars Liedtke wrote:
> - On a line per line basis? on a function/method basis?
I usually log the start and end of functions. I could also lo
Hello,
inspired by this thread
https://mail.python.org/pipermail/python-list/2022-February/905167.html
I finally came around to send in this question.
I know how to use python logging generally. Being on the DevOps-Side of
things at the moment, I naturally began liking to run tools, which no