Multiprocessing in Python: Logging

  Рет қаралды 14,526

LucidProgramming

LucidProgramming

Күн бұрын

Пікірлер: 28
@davidgolembiowski4275
@davidgolembiowski4275 5 жыл бұрын
Thanks for another great contribution, @LucidProgramming.
@LucidProgramming
@LucidProgramming 5 жыл бұрын
No problem, glad you enjoyed! :)
@sudarsandm
@sudarsandm 5 жыл бұрын
Please do a video series on Design patterns involving Python. That would be of great help.
@LucidProgramming
@LucidProgramming 5 жыл бұрын
Will put it on my list. Thanks for the suggestion!
@talbarak8861
@talbarak8861 4 жыл бұрын
Few comments: A. It worth mentioning that multiprocessing has its own specific logger, to which the multiprocessing module writes its own log entries, as opposed to the general logging module which you can use to set your own logger and write your own log entries. B. If I'm not mistaken, log_to_stderr() calls get_logger by itself, and then returns a logger, so calling get_logger again is unnecessary. C. It is also worth mentioning that log_to_stderr also automatically set the logging format (to '[%(levelname)s/%(processName)s] %(message)s'). So, the bottom line is that log_to_stderr, does the following: A. Calls get_logger and returns a logger object. B. Add an handler to redirect the output to standard error. C. Set the logging format to '[%(levelname)s/%(processName)s] %(message)s'
@LucidProgramming
@LucidProgramming 4 жыл бұрын
Good points, thank you for mentioning those!
@GelsYT
@GelsYT 4 жыл бұрын
THANK YOU SO MUCH FOR THIS! I LEARNED A LOT!
@LucidProgramming
@LucidProgramming 4 жыл бұрын
Cheers, and thanks for watching!
@haytamdz1157
@haytamdz1157 6 жыл бұрын
useful information ___thanks
@LucidProgramming
@LucidProgramming 6 жыл бұрын
Thanks as always for your feedback, Haytam! Cheers, and thank you for watching!
@haytamdz1157
@haytamdz1157 6 жыл бұрын
I hope you do a lesson about Multiprocessing in Python with selenium
@LucidProgramming
@LucidProgramming 6 жыл бұрын
That's a great idea, I'll definitely add that to my list. Thanks for the suggestion!
@scienceblossom6197
@scienceblossom6197 5 жыл бұрын
This is great tutorial. Thanks. But I had to go through a whole tutorial to realize what logging does, lol. :) As far as I could understand, the logging in this video is specific to multiprocessing. But I'm not sure how it's really doing the "logging" since I don't see any logger.info(msg) or logger.error(msg) or etc.
@LucidProgramming
@LucidProgramming 5 жыл бұрын
Thanks. If the series of videos was on logging and it took you to the last video, I could understand the frustration. But this video is only on logging, so it would make sense that this is the video that covers that topic, right? :). If you want more info on this, the logging docs are very well-written.
@michielvg8298
@michielvg8298 4 жыл бұрын
Thank you for this video. However, when I run the code in my Anaconda Prompt, I get the following error message: AttributeError: module 'logging' has no attribute '_acquireLock' Do you know what might be wrong? I get the message on both Python 2.7 and Python 3.5 environments.
@LucidProgramming
@LucidProgramming 4 жыл бұрын
Can you confirm that the code you're running matches the code on my GitHub?
@michielvg8298
@michielvg8298 4 жыл бұрын
@@LucidProgramming Yes, I use exactly the same code as on your GitHub. If I run it from my IPython console (Spyder), I don't get any error message but neither do I get the output as you show in your video. The error appears when I run the code in my Anaconda prompt..
@LucidProgramming
@LucidProgramming 4 жыл бұрын
@@michielvg8298 Might be running a different version of Python in your Anaconda instance. It's hard to say without knowing more.
@michielvg8298
@michielvg8298 4 жыл бұрын
@@LucidProgramming When I open my Python 3.5 environment, I get the same error message in Anaconda as when I run the code in my base python 2.7 environment. Do you have any suggestions on that? :)
@LucidProgramming
@LucidProgramming 4 жыл бұрын
@@michielvg8298 Wait. I'm confused. I thought you mentioned when you run in the IDE you don't get an error, but when you run in Anaconda you do.
Multiprocessing in Python: Pool
13:51
LucidProgramming
Рет қаралды 78 М.
What's in the clown's bag? #clown #angel #bunnypolice
00:19
超人夫妇
Рет қаралды 39 МЛН
Wait for it 😂
00:19
ILYA BORZOV
Рет қаралды 7 МЛН
Когда отец одевает ребёнка @JaySharon
00:16
История одного вокалиста
Рет қаралды 16 МЛН
Multiprocessing in Python: Locks
13:19
LucidProgramming
Рет қаралды 31 М.
Python logging tutorial: loggers, handlers, and formatters
17:06
Python Logging - Tutorial
15:02
Tech With Tim
Рет қаралды 164 М.
If __name__ == "__main__" for Python Developers
8:47
Python Simplified
Рет қаралды 410 М.
Multiprocessing in Python: Introduction (Part 1)
13:51
LucidProgramming
Рет қаралды 79 М.
ASYNC sockets in Python
13:51
Carberra
Рет қаралды 8 М.
2 Ways to add Logging to your Python Code
9:16
John Watson Rooney
Рет қаралды 4,7 М.
Python Tutorial: Logging Advanced - Loggers, Handlers, and Formatters
19:47
What's in the clown's bag? #clown #angel #bunnypolice
00:19
超人夫妇
Рет қаралды 39 МЛН