Linux vmi2545633.contaboserver.net 6.1.0-32-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.129-1 (2025-03-06) x86_64
Apache/2.4.62 (Debian)
Server IP : 127.0.0.1 & Your IP : 127.0.0.1
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
local /
lib /
python3.11 /
dist-packages /
flask /
Delete
Unzip
Name
Size
Permission
Date
Action
__pycache__
[ DIR ]
drwxr-xr-x
2025-04-08 16:57
json
[ DIR ]
drwxr-xr-x
2025-04-08 16:57
sansio
[ DIR ]
drwxr-xr-x
2025-04-08 16:57
__init__.py
2.56
KB
-rw-r--r--
2025-04-08 16:57
__main__.py
30
B
-rw-r--r--
2025-04-08 16:57
app.py
60.28
KB
-rw-r--r--
2025-04-08 16:57
blueprints.py
4.43
KB
-rw-r--r--
2025-04-08 16:57
cli.py
36.22
KB
-rw-r--r--
2025-04-08 16:57
config.py
12.91
KB
-rw-r--r--
2025-04-08 16:57
ctx.py
14.77
KB
-rw-r--r--
2025-04-08 16:57
debughelpers.py
5.94
KB
-rw-r--r--
2025-04-08 16:57
globals.py
1.67
KB
-rw-r--r--
2025-04-08 16:57
helpers.py
22.97
KB
-rw-r--r--
2025-04-08 16:57
logging.py
2.32
KB
-rw-r--r--
2025-04-08 16:57
py.typed
0
B
-rw-r--r--
2025-04-08 16:57
sessions.py
15.07
KB
-rw-r--r--
2025-04-08 16:57
signals.py
750
B
-rw-r--r--
2025-04-08 16:57
templating.py
7.36
KB
-rw-r--r--
2025-04-08 16:57
testing.py
9.86
KB
-rw-r--r--
2025-04-08 16:57
typing.py
3.09
KB
-rw-r--r--
2025-04-08 16:57
views.py
6.8
KB
-rw-r--r--
2025-04-08 16:57
wrappers.py
9.19
KB
-rw-r--r--
2025-04-08 16:57
Save
Rename
from __future__ import annotations import logging import sys import typing as t from werkzeug.local import LocalProxy from .globals import request if t.TYPE_CHECKING: # pragma: no cover from .sansio.app import App @LocalProxy def wsgi_errors_stream() -> t.TextIO: """Find the most appropriate error stream for the application. If a request is active, log to ``wsgi.errors``, otherwise use ``sys.stderr``. If you configure your own :class:`logging.StreamHandler`, you may want to use this for the stream. If you are using file or dict configuration and can't import this directly, you can refer to it as ``ext://flask.logging.wsgi_errors_stream``. """ if request: return request.environ["wsgi.errors"] # type: ignore[no-any-return] return sys.stderr def has_level_handler(logger: logging.Logger) -> bool: """Check if there is a handler in the logging chain that will handle the given logger's :meth:`effective level <~logging.Logger.getEffectiveLevel>`. """ level = logger.getEffectiveLevel() current = logger while current: if any(handler.level <= level for handler in current.handlers): return True if not current.propagate: break current = current.parent # type: ignore return False #: Log messages to :func:`~flask.logging.wsgi_errors_stream` with the format #: ``[%(asctime)s] %(levelname)s in %(module)s: %(message)s``. default_handler = logging.StreamHandler(wsgi_errors_stream) # type: ignore default_handler.setFormatter( logging.Formatter("[%(asctime)s] %(levelname)s in %(module)s: %(message)s") ) def create_logger(app: App) -> logging.Logger: """Get the Flask app's logger and configure it if needed. The logger name will be the same as :attr:`app.import_name <flask.Flask.name>`. When :attr:`~flask.Flask.debug` is enabled, set the logger level to :data:`logging.DEBUG` if it is not set. If there is no handler for the logger's effective level, add a :class:`~logging.StreamHandler` for :func:`~flask.logging.wsgi_errors_stream` with a basic format. """ logger = logging.getLogger(app.name) if app.debug and not logger.level: logger.setLevel(logging.DEBUG) if not has_level_handler(logger): logger.addHandler(default_handler) return logger