Python's Logging Function

preview_player
Показать описание
The basics of Python's built in logging / log abilities
Рекомендации по теме
Комментарии
Автор

Just a note, the syntax for Python 3 is now "Exception as e:" instead of the comma.

jnr
Автор

Good question, I really don't know that one. If I happen to figure it out, I'll post a tutorial of it.

sentdex
Автор

When I take hours watching your latest video and coming back on watching this. I can tell how much your video is different. lol

謝其宏-pz
Автор

Sorry I didnt understand, what is the level parameter of the first function for?. What is the difference between putting DEBUG or WARNING, or in the case of the function main(), if I put logging.debug or logging.critical, etc.?

JosXcecution
Автор

i seem to be having trouble reaching my logfile.log after running the program ive been experiencing this with several file programs on windows my linux version seems to write read and manage files well but windows seems to always loose are simply not even create the file? any tips or solutions?

alecmedina
Автор

my program function is to post a url and if a image pop ups, log the image and log the link. if a image doesnt pop up, skip

anthonysanchez
Автор

how can we Create two more log files with different name in pyhton 2.X... help me

rokkamsrikanthreddy
Автор

Nice tutorial...Can you define recipe for developing Image Archival Solution using Python? If you can create tutorial for a tiny version that would be great!. 

mudassarhashmi
Автор

Five level of logging:
debug
info
warning
error
critical
Didn't use so offen critical before

Leon-xgzj
Автор

So..great tutorial, but is there anyway to log something such as a users name, for later use... Such as
"What is your name?:
Then the user would type in their name, and you could print something saying like:
"Hello, {name}!
If not..thanks anyways!

bdav
Автор

Hi @sentdex. I tried to run the same program and I got the following error:

logging.basicConfig(filename='logfile.log', level=logging.DEBUG)
AttributeError: 'module' object has no attribute 'basicConfig'

Can you help me figure this one out? Thanks

jeromedeleon
Автор

The voice is too much bad, it gets echo

saharsa