Linux vps-61133.fhnet.fr 4.9.0-19-amd64 #1 SMP Debian 4.9.320-2 (2022-06-30) x86_64
Apache/2.4.25 (Debian)
Server IP : 93.113.207.21 & Your IP : 216.73.216.112
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
src /
Python-3.10.14 /
PC /
layout /
support /
Delete
Unzip
Name
Size
Permission
Date
Action
__init__.py
0
B
-rw-r--r--
2024-03-19 22:46
appxmanifest.py
17.49
KB
-rw-r--r--
2024-03-19 22:46
catalog.py
834
B
-rw-r--r--
2024-03-19 22:46
constants.py
1.08
KB
-rw-r--r--
2024-03-19 22:46
filesets.py
2.56
KB
-rw-r--r--
2024-03-19 22:46
logging.py
1.93
KB
-rw-r--r--
2024-03-19 22:46
nuspec.py
2.39
KB
-rw-r--r--
2024-03-19 22:46
options.py
3.27
KB
-rw-r--r--
2024-03-19 22:46
pip.py
2.19
KB
-rw-r--r--
2024-03-19 22:46
props.py
4.14
KB
-rw-r--r--
2024-03-19 22:46
python.props
3.06
KB
-rw-r--r--
2024-03-19 22:46
Save
Rename
""" Logging support for make_layout. """ __author__ = "Steve Dower <steve.dower@python.org>" __version__ = "3.8" import logging import sys __all__ = [] LOG = None HAS_ERROR = False def public(f): __all__.append(f.__name__) return f @public def configure_logger(ns): global LOG if LOG: return LOG = logging.getLogger("make_layout") LOG.level = logging.DEBUG if ns.v: s_level = max(logging.ERROR - ns.v * 10, logging.DEBUG) f_level = max(logging.WARNING - ns.v * 10, logging.DEBUG) else: s_level = logging.ERROR f_level = logging.INFO handler = logging.StreamHandler(sys.stdout) handler.setFormatter(logging.Formatter("{levelname:8s} {message}", style="{")) handler.setLevel(s_level) LOG.addHandler(handler) if ns.log: handler = logging.FileHandler(ns.log, encoding="utf-8", delay=True) handler.setFormatter( logging.Formatter("[{asctime}]{levelname:8s}: {message}", style="{") ) handler.setLevel(f_level) LOG.addHandler(handler) class BraceMessage: def __init__(self, fmt, *args, **kwargs): self.fmt = fmt self.args = args self.kwargs = kwargs def __str__(self): return self.fmt.format(*self.args, **self.kwargs) @public def log_debug(msg, *args, **kwargs): return LOG.debug(BraceMessage(msg, *args, **kwargs)) @public def log_info(msg, *args, **kwargs): return LOG.info(BraceMessage(msg, *args, **kwargs)) @public def log_warning(msg, *args, **kwargs): return LOG.warning(BraceMessage(msg, *args, **kwargs)) @public def log_error(msg, *args, **kwargs): global HAS_ERROR HAS_ERROR = True return LOG.error(BraceMessage(msg, *args, **kwargs)) @public def log_exception(msg, *args, **kwargs): global HAS_ERROR HAS_ERROR = True return LOG.exception(BraceMessage(msg, *args, **kwargs)) @public def error_was_logged(): return HAS_ERROR