OpenQuizz
Une application de gestion des contenus pédagogiques
flask.logging Namespace Reference

Functions

def wsgi_errors_stream ()
 
def has_level_handler (logger)
 
def create_logger (app)
 

Variables

 default_handler
 

Function Documentation

◆ create_logger()

def flask.logging.create_logger (   app)
Get the the Flask apps'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.

◆ has_level_handler()

def flask.logging.has_level_handler (   logger)
Check if there is a handler in the logging chain that will handle the
given logger's :meth:`effective level <~logging.Logger.getEffectiveLevel>`.

◆ wsgi_errors_stream()

def flask.logging.wsgi_errors_stream ( )
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``.

Variable Documentation

◆ default_handler

default_handler