Add _thread attribute for logging.handlers.QueueListener (#10747)

This commit is contained in:
Tomás Farías Santana
2023-09-22 00:54:19 +02:00
committed by GitHub
parent 53422f8918
commit a76978b28f

View File

@@ -7,6 +7,7 @@ from collections.abc import Callable
from logging import FileHandler, Handler, LogRecord
from re import Pattern
from socket import SocketKind, socket
from threading import Thread
from typing import Any, ClassVar, Protocol, TypeVar
_T = TypeVar("_T")
@@ -264,6 +265,7 @@ class QueueListener:
handlers: tuple[Handler, ...] # undocumented
respect_handler_level: bool # undocumented
queue: _QueueLike[Any] # undocumented
_thread: Thread | None # undocumented
def __init__(self, queue: _QueueLike[Any], *handlers: Handler, respect_handler_level: bool = False) -> None: ...
def dequeue(self, block: bool) -> LogRecord: ...
def prepare(self, record: LogRecord) -> Any: ...