Server IP : 85.214.239.14 / Your IP : 3.15.10.104 Web Server : Apache/2.4.62 (Debian) System : Linux h2886529.stratoserver.net 4.9.0 #1 SMP Tue Jan 9 19:45:01 MSK 2024 x86_64 User : www-data ( 33) PHP Version : 7.4.18 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, MySQL : OFF | cURL : OFF | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /proc/2/cwd/proc/self/root/proc/3/task/3/cwd/lib/python3/dist-packages/setuptools/_distutils/ |
Upload File : |
""" A simple log mechanism styled after PEP 282. Retained for compatibility and should not be used. """ import logging import warnings from ._log import log as _global_log DEBUG = logging.DEBUG INFO = logging.INFO WARN = logging.WARN ERROR = logging.ERROR FATAL = logging.FATAL log = _global_log.log debug = _global_log.debug info = _global_log.info warn = _global_log.warning error = _global_log.error fatal = _global_log.fatal def set_threshold(level): orig = _global_log.level _global_log.setLevel(level) return orig def set_verbosity(v): if v <= 0: set_threshold(logging.WARN) elif v == 1: set_threshold(logging.INFO) elif v >= 2: set_threshold(logging.DEBUG) class Log(logging.Logger): """distutils.log.Log is deprecated, please use an alternative from `logging`.""" def __init__(self, threshold=WARN): warnings.warn(Log.__doc__) # avoid DeprecationWarning to ensure warn is shown super().__init__(__name__, level=threshold) @property def threshold(self): return self.level @threshold.setter def threshold(self, level): self.setLevel(level) warn = logging.Logger.warning