mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-25 05:11:09 +08:00
add 'Handler' and 'Filterer' classes to logging
This commit is contained in:
committed by
Łukasz Langa
parent
97a6d27558
commit
8a5447be05
@@ -8,6 +8,7 @@ from string import Template
|
||||
from time import struct_time
|
||||
from types import TracebackType
|
||||
import sys
|
||||
import threading
|
||||
|
||||
_SysExcInfoType = Union[Tuple[type, BaseException, TracebackType],
|
||||
Tuple[None, None, None]]
|
||||
@@ -117,7 +118,18 @@ DEBUG = ... # type: int
|
||||
NOTSET = ... # type: int
|
||||
|
||||
|
||||
class Handler:
|
||||
class Filterer(object):
|
||||
filters = ... # type: List[Filter]
|
||||
def __init__(self) -> None:
|
||||
def addFilter(self, filter: Filter) -> None:
|
||||
def removeFilter(self, filter: Filter) -> None:
|
||||
def filter(self, record) -> bool:
|
||||
|
||||
|
||||
class Handler(Filterer):
|
||||
level = ... # type: int
|
||||
formatter = ... # type: Optional[Formatter]
|
||||
lock = ... # type: Optional[threading.LockType]
|
||||
def __init__(self, level: int = ...) -> None: ...
|
||||
def createLock(self) -> None: ...
|
||||
def acquire(self) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user