]>
crepu.dev Git - config.git/blob - djavu-asus/elpy/rpc-venv/lib/python3.11/site-packages/setuptools/_distutils/log.py
2 A simple log mechanism styled after PEP 282.
4 Retained for compatibility and should not be used.
10 from ._log
import log
as _global_log
20 debug
= _global_log
.debug
21 info
= _global_log
.info
22 warn
= _global_log
.warning
23 error
= _global_log
.error
24 fatal
= _global_log
.fatal
27 def set_threshold(level
):
28 orig
= _global_log
.level
29 _global_log
.setLevel(level
)
35 set_threshold(logging
.WARN
)
37 set_threshold(logging
.INFO
)
39 set_threshold(logging
.DEBUG
)
42 class Log(logging
.Logger
):
43 """distutils.log.Log is deprecated, please use an alternative from `logging`."""
45 def __init__(self
, threshold
=WARN
):
46 warnings
.warn(Log
.__doc
__) # avoid DeprecationWarning to ensure warn is shown
47 super().__init
__(__name__
, level
=threshold
)
54 def threshold(self
, level
):
57 warn
= logging
.Logger
.warning