2 Ways to add Logging to your Python Code

preview_player
Показать описание
Yes sometimes I log with print(). I know..

Рекомендации по теме
Комментарии
Автор

I would love to see a video on how to securely handle secrets and/or keys, using hashicorp vault or keystore or something. Thanks for all the great content.

DramaVomit
Автор

My favorite part of the logging library is being able to adjust the granularity of logs via basicConfig to hide debug level statements without having to comment anything out. You can also pass a command-line argument to your function to set the logging level if you have the appropriate logic. This is all covered in the "Basic Tutorial" section of the logging docs.

One issue I ran into was that, according to a post on stackoverflow, if any of the other libraries you import also use the logging library there may be a conflict over which basicConfig gets executed. The solution was to put the basicConfig as close to the beginning of your executed code as you can.

RJesus
Автор

A like from start! Another great vid! Now continue watching... ❤❤

pypypy
Автор

I generally use print when I'm still writing the code, but I move to logging when I finish it. I have a couple of logging configs that are standard in my projects, so I just copy/paste between them.

DanielLavedoniodeLima_DLL
Автор

3:45 you run your code on DO server. Would love to see a video about your development environment!

pypypy
Автор

have you shared your dotfiles? interested in both your nvim setup and terminal

matthewp
Автор

Hi. I wanted to ask i am trying to scrap information by an api. I am using laravel for that purpose on each request i am changing my ips, user-agents, headers. I am also giving random delays of 15 to 25 seconds if 429 error occurs i am using sleep for 60 to 70 seconds but still i am facing alot of 429 error. What should i do?

muhammadshahryar
Автор

4:08 this is not core python and technically getting into awk programing. I think.

ChristopherBruns-oo
visit shbcf.ru