Register multithreaded processes in python

I thought to use the registration module to register all events in one file. The number of threads should be constant from start to finish, but if one thread fails, I would just like to register it and continue. What is an easy way to do this? Thanks!

+3
source share
1 answer

Not quite sure what you mean by “one stream of failures,” but if “failure” means that the exception extends up to the top function of the stream, then you can wrap each top function of the stream (for example, in the decorator) to catch any exception, register everything you wish and re-raise. The module loggingmust ensure the security of logging action flows without the additional precautions required by you.

+7
source

Source: https://habr.com/ru/post/1716931/


All Articles