Re: How do you log in your projects?

2022-02-11 Thread alister via Python-list
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

Re: How do you log in your projects?

2022-02-10 Thread Martin Di Paola
? 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

Re: How do you log in your projects?

2022-02-10 Thread Marco Sulla
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

Re: How do you log in your projects?

2022-02-09 Thread Martin Di Paola
- 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,

Re: How do you log in your projects?

2022-02-08 Thread Barry
> 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

Re: How do you log in your projects?

2022-02-08 Thread Marco Sulla
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

How do you log in your projects?

2022-02-08 Thread Lars Liedtke
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