X7ROOT File Manager
Current Path:
/opt/alt/python311/lib/python3.11/site-packages/loguru
opt
/
alt
/
python311
/
lib
/
python3.11
/
site-packages
/
loguru
/
📁
..
📄
__init__.py
(626 B)
📄
__init__.pyi
(14.1 KB)
📁
__pycache__
📄
_asyncio_loop.py
(597 B)
📄
_better_exceptions.py
(19.53 KB)
📄
_colorama.py
(1.63 KB)
📄
_colorizer.py
(14.26 KB)
📄
_contextvars.py
(321 B)
📄
_ctime_functions.py
(1.5 KB)
📄
_datetime.py
(3.67 KB)
📄
_defaults.py
(2.86 KB)
📄
_error_interceptor.py
(1.08 KB)
📄
_file_sink.py
(14.19 KB)
📄
_filters.py
(618 B)
📄
_get_frame.py
(458 B)
📄
_handler.py
(12.34 KB)
📄
_locks_machinery.py
(1.28 KB)
📄
_logger.py
(93.72 KB)
📄
_recattrs.py
(2.79 KB)
📄
_simple_sinks.py
(3.65 KB)
📄
_string_parsers.py
(4.6 KB)
📄
py.typed
(0 B)
Editing: _error_interceptor.py
import sys import traceback class ErrorInterceptor: def __init__(self, should_catch, handler_id): self._should_catch = should_catch self._handler_id = handler_id def should_catch(self): return self._should_catch def print(self, record=None, *, exception=None): if not sys.stderr: return if exception is None: type_, value, traceback_ = sys.exc_info() else: type_, value, traceback_ = (type(exception), exception, exception.__traceback__) try: sys.stderr.write("--- Logging error in Loguru Handler #%d ---\n" % self._handler_id) try: record_repr = str(record) except Exception: record_repr = "/!\\ Unprintable record /!\\" sys.stderr.write("Record was: %s\n" % record_repr) traceback.print_exception(type_, value, traceback_, None, sys.stderr) sys.stderr.write("--- End of logging error ---\n") except OSError: pass finally: del type_, value, traceback_
Upload File
Create Folder