# Path: src/werkzeug/_internal.py
# def _log(type: str, message: str, *args: t.Any, **kwargs: t.Any) -> None:
#     """Log a message to the 'werkzeug' logger.
# 
#     The logger is created the first time it is needed. If there is no
#     level set, it is set to :data:`logging.INFO`. If there is no handler
#     for the logger's effective level, a :class:`logging.StreamHandler`
#     is added.
#     """
#     global _logger
# 
#     if _logger is None:
#         _logger = logging.getLogger("werkzeug")
# 
#         if _logger.level == logging.NOTSET:
#             _logger.setLevel(logging.INFO)
# 
#         if not _has_level_handler(_logger):
#             _logger.addHandler(_ColorStreamHandler())
# 
#     getattr(_logger, type)(message.rstrip(), *args, **kwargs)


import fnmatch
import os
import subprocess
import sys
import threading
import time
import typing as t
        import termios
    import signal
from itertools import chain
from pathlib import PurePath
from ._internal import _log
        from watchdog.observers import Observer
        from watchdog.events import PatternMatchingEventHandler


# The various system prefixes where imports are found. Base values are
# different when running in a virtualenv. All reloaders will ignore the
# base paths (usually the system installation). The stat reloader won't
# scan the virtualenv paths, it will only include modules that are
# already imported.
_ignore_always = tuple({sys.base_prefix, sys.base_exec_prefix})
prefix = {*_ignore_always, sys.prefix, sys.exec_prefix}

if hasattr(sys, "real_prefix"):
    # virtualenv < 20
    prefix.add(sys.real_prefix)  # type: ignore[attr-defined]

_stat_ignore_scan = tuple(prefix)
del prefix

# Path: src/werkzeug/_internal.py
# def _log(type: str, message: str, *args: t.Any, **kwargs: t.Any) -> None:
#     """Log a message to the 'werkzeug' logger.
# 
#     The logger is created the first time it is needed. If there is no
#     level set, it is set to :data:`logging.INFO`. If there is no handler
#     for the logger's effective level, a :class:`logging.StreamHandler`
#     is added.
#     """
#     global _logger
# 
#     if _logger is None:
#         _logger = logging.getLogger("werkzeug")
# 
#         if _logger.level == logging.NOTSET:
#             _logger.setLevel(logging.INFO)
# 
#         if not _has_level_handler(_logger):
#             _logger.addHandler(_ColorStreamHandler())
# 
#     getattr(_logger, type)(message.rstrip(), *args, **kwargs)


# Path: src/werkzeug/_reloader.py
import fnmatch
import os
import subprocess
import sys
import threading
import time
import typing as t
        import termios
    import signal
from itertools import chain
from pathlib import PurePath
from ._internal import _log
        from watchdog.observers import Observer
        from watchdog.events import PatternMatchingEventHandler



# The various system prefixes where imports are found. Base values are
# different when running in a virtualenv. All reloaders will ignore the
# base paths (usually the system installation). The stat reloader won't
# scan the virtualenv paths, it will only include modules that are
# already imported.
_ignore_always = tuple({sys.base_prefix, sys.base_exec_prefix})
prefix = {*_ignore_always, sys.prefix, sys.exec_prefix}

if hasattr(sys, "real_prefix"):
    # virtualenv < 20
    prefix.add(sys.real_prefix)  # type: ignore[attr-defined]

_stat_ignore_scan = tuple(prefix)
del prefix

_ignore_common_dirs = {