Skip to content

Instantly share code, notes, and snippets.

from config import ThreadFilter, IgnoreThreadsFilter # noqa: F401
import logging
import threading
import time
# Attach the IgnoreThreadsFilter to the main root log handler
# This is responsible for ignoring all log records originating from
# new threads.
main_handler = logging.FileHandler("/tmp/mainlogfile.log", 'a')