Sep-08-2018, 06:41 AM
Hi all,
The web contains a tremendous amount of "in-depth guide to Python logging". It therefore becomes very easy to find one part of the information about logging: how to configure it. But how to use it?
I do not ask how to use getLogger and similar functions, but where to place them, and how to choose the level on a software engineering side. While info, error, and critical look easy to place (but are they?), I have no idea what are the best practices regarding debug. Shall I add one at the beginning and end of every method? Every second line?
I'm just looking for a guide on this matter, being a PEP, recommendations from a large project, or any document from a quality source.
Thanks in advance!
Duna
The web contains a tremendous amount of "in-depth guide to Python logging". It therefore becomes very easy to find one part of the information about logging: how to configure it. But how to use it?
I do not ask how to use getLogger and similar functions, but where to place them, and how to choose the level on a software engineering side. While info, error, and critical look easy to place (but are they?), I have no idea what are the best practices regarding debug. Shall I add one at the beginning and end of every method? Every second line?
I'm just looking for a guide on this matter, being a PEP, recommendations from a large project, or any document from a quality source.
Thanks in advance!
Duna