Python Logging Tutorial #4 - Python Advanced Logging | Loggers | Handlers | Formatters

preview_player
Показать описание
In this Python Logging Tutorial, we will learn how to configure Python advanced logging and complete details about loggers, handlers and formatters and how to configure advanced logging in python. We will be creating the utility for advanced logging then using it in Selenium Python framework to configure logging in automation project.

Help me in spreading the knowledge, please hit LIKE, SHARE, and SUBSCRIBE for the latest tutorials. More tutorial playlists below:

🔶 ENROL IN MANY FREE TRAININGS ON RCV ACADEMY PORTAL 🔶

🔶 FOLLOW US ON TWITTER 🔶

🔶 LIKE US ON FACEBOOK 🔶

🔶 OUR TUTORIAL WEBSITES 🔶

🔶 GET MY TRAININGS ON UDEMY 🔶

#PythonLoggingTutorial #PythonLogging #PythonSelenium #SeleniumPython #PythonSeleniumTutorial #SeleniumWebdriver #TestAutomation #SoftwareTesting #RcvAcademy #SoftwareTestingMentor

Join this channel to get access to perks:
Рекомендации по теме
Комментарии
Автор

I am facing one issue I am able to create log files for my code but how can i make sure that no other person can modify my log files when they try it should ask to save as which will eventually wont modify the actual log and log would only be updated through code.

Iqbalsharib
Автор

mine does not show filename in log (__main__) ? can you suggest any advice ?

viptt
Автор

To set a filemode:

file_handler = logging.FileHandler('AdvancedLog.log', mode='w')

restoreupscale
Автор

Thanks for the complete Tutorial on Logging.

I followed the all 4 videos till now but in this video i am facing one issue related to 'getLogger('demolog')'. I replicated the same code but in the output i am not getting the 'demolog' specifically. My logs looks like below:

07/29/2021 11:42:39 PM - DEBUG - Hi! I am Debug Message
07/29/2021 11:42:39 PM - INFO - Hi! I am info Message
07/29/2021 11:42:39 PM - CRITICAL - Hi! I am Critical Message
07/29/2021 11:42:39 PM - WARNING - Hi! I am warning Message

where the __name__ or 'demolog' is not coming as a part of console logs or in the log file as well.
P.S - I am using eclipse IDE

Requesting your help here as it is a very good approach to get the file or TestCase Name in the logs from which the Logger is being called.

shanukhan-udgg
Автор

Marvellous video, sir, you are a gem

PankajSharmaPS
Автор

Hi Manish. Thanks soooo much for this tutorial serie.
I notice that in this serie "Selenium Python Tutorial", the following course seems to be missing, which is confusing for someone watching the serie step by step: "Python Logging Tutorial #5 - How to create Custom Logger in Python". From my understanding of your serie, I imagine this missing course comes after the current one "Python Logging Tutorial #4 - Python Advanced Logging | Loggers | Handlers | Formatters" which is video 116. So maybe "Python Logging Tutorial #5" was supposed to be the video 117 in this serie ?

justinngoufo