Skip to content

Instantly share code, notes, and snippets.

@FanchenBao
Created December 10, 2019 00:14
Show Gist options
  • Save FanchenBao/585229b1b2505b87b6cc1e172f13a5dd to your computer and use it in GitHub Desktop.
Save FanchenBao/585229b1b2505b87b6cc1e172f13a5dd to your computer and use it in GitHub Desktop.
Expanded demo code for Python3 logging with multiprocessing
# 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