Skip to content

Commit

Permalink
undoing the logging configuration that wsdiscovery sets
Browse files Browse the repository at this point in the history
  • Loading branch information
timmarkhuff committed Oct 10, 2024
1 parent 09e7f98 commit 18b139e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/framegrab/grabber.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@
from .rtsp_discovery import AutodiscoverMode, RTSPDiscovery
from .unavailable_module import UnavailableModule

# The wsdiscovery packages calls logging.basicConfig, which will wipe out any logging config
# that framegrab users have set, which is not good. To clear the config that wsdiscovery sets, we
# will run the following
root_logger = logging.getLogger()
if root_logger.hasHandlers():
root_logger.handlers.clear()

# Create a logger for this module
logger = logging.getLogger(__name__)

# Optional imports
Expand Down

0 comments on commit 18b139e

Please sign in to comment.