Created
December 10, 2019 00:14
-
-
Save FanchenBao/585229b1b2505b87b6cc1e172f13a5dd to your computer and use it in GitHub Desktop.
Expanded demo code for Python3 logging with multiprocessing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# comment out logger configuration for worker process | |
def worker_process(queue): | |
# worker_configurer(queue) | |
for i in range(3): | |
sleep(random()) | |
innerlogger = logging.getLogger('worker') | |
innerlogger.info(f'Logging a random number {randint(0, 10)}') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment