DEV Community

Cover image for Logging
Anamika
Anamika

Posted on • Updated on

Logging

Hey Guys! Hope everyone is good out there and doing well in all what you all can do :)
Recently, I was revising the Exception-Handling concept in Python. I came through a topic called "logging".
Since now I've had quite a fine time with Python, I still could not figure out what's the exact use of learning logging concept for a student. I haven't come across any scenarios where I would be using the logging concept.
It would really be helpful if you guys could help me out.
Looking forward to the answers you guys!!
Thanks a lot in advance ;)

Top comments (6)

Collapse
 
dazfuller profile image
Darren Fuller

Logging is incredibly useful for applications where you want to later review what it’s been doing, or review the details of handled exceptions. If your application consists of different components then you can use other tools to bring these various log files together and review the overall health of the application.

You can also do things like controlling the level of logging, so during development you might write out all of statements including debug level, but in production you might limit it to only info or error and above.

Definitely worth spending the time learning about it.

Collapse
 
noviicee profile image
Anamika

That seems really interesting XD XD. Thanks a lot! :)

Collapse
 
nahidahmed profile image
Nahidahmed

It's boring during the development phase but once your app moves to production it will your best thing to review how the real world users are interacting with your app and will give loads of insights on improving and in case of a live issue will help save your time to find out the reasons quickly.

Collapse
 
noviicee profile image
Anamika

Indeed! I felt the same.
Actually I haven't used it practically yet. But now am surely lookin forward to! XD :)

Collapse
 
bataunga_nhi profile image
Sword

I also have a confusion in logging module.

Collapse
 
noviicee profile image
Anamika

I hope the comments will help you. They made my vision a bit clear on it.

In concise form, when you develop an applications and you want to later review what it’s been doing, or review the details of handled exceptions, you can make use of it :)