This file contains hidden or 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
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') |