ds_stoa.utils.logger._context ============================= .. py:module:: ds_stoa.utils.logger._context .. autoapi-nested-parse:: Logger Context Filter This module contains the context filter for the logger. Classes ------- .. autoapisummary:: ds_stoa.utils.logger._context.ContextFilter ds_stoa.utils.logger._context.FolderNameFilter Module Contents --------------- .. py:class:: ContextFilter(prefix: Optional[str] = None) Bases: :py:obj:`logging.Filter` Context filter to add customized field in the logging record. This filter is used to add a prefix to the log. .. py:method:: filter(record) -> Literal[True] Add prefix to the log record. :param record: The log record. :return: True .. py:class:: FolderNameFilter(name='') Bases: :py:obj:`logging.Filter` Filter instances are used to perform arbitrary filtering of LogRecords. Loggers and Handlers can optionally use Filter instances to filter records as desired. The base filter class only allows events which are below a certain point in the logger hierarchy. For example, a filter initialized with "A.B" will allow events logged by loggers "A.B", "A.B.C", "A.B.C.D", "A.B.D" etc. but not "A.BB", "B.A.B" etc. If initialized with the empty string, all events are passed. .. py:method:: filter(record) -> Literal[True] Add the folder name to the log record. :param record: The log record. :return: True