tribler.core.restapi.logging_endpoint ===================================== .. py:module:: tribler.core.restapi.logging_endpoint Classes ------- .. autoapisummary:: tribler.core.restapi.logging_endpoint.RotatingMemoryHandler tribler.core.restapi.logging_endpoint.LoggingEndpoint Module Contents --------------- .. py:class:: RotatingMemoryHandler(capacity, flushLevel=logging.ERROR, target=None, flushOnClose=True) Bases: :py:obj:`logging.handlers.MemoryHandler` A custom MemoryHandler flusher. Instead of delegating to the ``target`` and flushing the ``buffer``, simply keep the last ``capacity`` records in the buffer. .. py:method:: flush() -> None This is called when our buffer is at capacity and needs to be flushed. We get the handler lock and rotate the buffer. .. py:class:: LoggingEndpoint Bases: :py:obj:`tribler.core.restapi.rest_endpoint.RESTEndpoint` This endpoint allows retrieval of the logs. .. py:attribute:: path :value: '/api/logging' .. py:attribute:: base_handler .. py:attribute:: memory_logger .. py:method:: get_logs(request: aiohttp.web.Request) -> tribler.core.restapi.rest_endpoint.RESTResponse :async: Return the most recent logs.