Python Forum
How to use Logging with multiprocessing in Python3
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to use Logging with multiprocessing in Python3
#2
your code works for me as expected.

console:
Output:
yes yes
error.log
Output:
2020-12-29 11:03:34,853 ERROR 2 is not = 1 2020-12-29 11:03:34,854 ERROR 3 is not = 1 2020-12-29 11:03:34,854 ERROR 4 is not = 1 2020-12-29 11:03:34,854 ERROR 5 is not = 1 2020-12-29 11:03:34,854 ERROR 6 is not = 1 2020-12-29 11:03:34,854 ERROR 7 is not = 1 2020-12-29 11:03:34,855 ERROR 8 is not = 1 2020-12-29 11:03:34,855 ERROR 9 is not = 1 2020-12-29 11:03:34,855 ERROR 10 is not = 1 2020-12-29 11:03:34,855 ERROR 4 is not = 1 2020-12-29 11:03:34,856 ERROR 5 is not = 1 2020-12-29 11:03:34,856 ERROR 4 is not = 1 2020-12-29 11:03:34,856 ERROR 3 is not = 1 2020-12-29 11:03:34,856 ERROR 4 is not = 1 2020-12-29 11:03:34,857 ERROR 5 is not = 1 2020-12-29 11:03:34,857 ERROR 4 is not = 1 2020-12-29 11:03:34,857 ERROR 3 is not = 1 2020-12-29 11:03:34,857 ERROR 4 is not = 1 2020-12-29 11:03:34,858 ERROR 5 is not = 1 2020-12-29 11:03:34,858 ERROR 4 is not = 1 2020-12-29 11:03:34,858 ERROR 3 is not = 1 2020-12-29 11:03:34,858 ERROR 4 is not = 1 2020-12-29 11:03:34,858 ERROR 3 is not = 1
Not sure why would you set max_workers=1 though :-)
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply


Messages In This Thread
RE: How to use Logging with multiprocessing in Python3 - by buran - Dec-29-2020, 09:06 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Gnuradio python3 is not compatible python3 xmlrpc library How Can I Fix İt ? muratoznnnn 3 4,988 Nov-07-2019, 05:47 PM
Last Post: DeaD_EyE

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020