# Stubs for logging.handlers (Python 3.4)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.

from typing import Any
import logging

threading = ...  # type: Any
DEFAULT_TCP_LOGGING_PORT = ...  # type: Any
DEFAULT_UDP_LOGGING_PORT = ...  # type: Any
DEFAULT_HTTP_LOGGING_PORT = ...  # type: Any
DEFAULT_SOAP_LOGGING_PORT = ...  # type: Any
SYSLOG_UDP_PORT = ...  # type: Any
SYSLOG_TCP_PORT = ...  # type: Any

class BaseRotatingHandler(logging.FileHandler):
    mode = ...  # type: Any
    encoding = ...  # type: Any
    namer = ...  # type: Any
    rotator = ...  # type: Any
    def __init__(self, filename, mode, encoding=..., delay=...) -> None: ...
    def emit(self, record): ...
    def rotation_filename(self, default_name): ...
    def rotate(self, source, dest): ...

class RotatingFileHandler(BaseRotatingHandler):
    maxBytes = ...  # type: Any
    backupCount = ...  # type: Any
    def __init__(self, filename, mode=..., maxBytes=..., backupCount=..., encoding=...,
                 delay=...): ...
    stream = ...  # type: Any
    def doRollover(self): ...
    def shouldRollover(self, record): ...

class TimedRotatingFileHandler(BaseRotatingHandler):
    when = ...  # type: Any
    backupCount = ...  # type: Any
    utc = ...  # type: Any
    atTime = ...  # type: Any
    interval = ...  # type: Any
    suffix = ...  # type: Any
    extMatch = ...  # type: Any
    dayOfWeek = ...  # type: Any
    rolloverAt = ...  # type: Any
    def __init__(self, filename, when=..., interval=..., backupCount=..., encoding=..., delay=...,
                 utc=..., atTime=...): ...
    def computeRollover(self, currentTime): ...
    def shouldRollover(self, record): ...
    def getFilesToDelete(self): ...
    stream = ...  # type: Any
    def doRollover(self): ...

class WatchedFileHandler(logging.FileHandler):
    def __init__(self, filename, mode=..., encoding=..., delay=...) -> None: ...
    stream = ...  # type: Any
    def emit(self, record): ...

class SocketHandler(logging.Handler):
    host = ...  # type: Any
    port = ...  # type: Any
    address = ...  # type: Any
    sock = ...  # type: Any
    closeOnError = ...  # type: Any
    retryTime = ...  # type: Any
    retryStart = ...  # type: Any
    retryMax = ...  # type: Any
    retryFactor = ...  # type: Any
    def __init__(self, host, port) -> None: ...
    def makeSocket(self, timeout=...): ...
    retryPeriod = ...  # type: Any
    def createSocket(self): ...
    def send(self, s): ...
    def makePickle(self, record): ...
    def handleError(self, record): ...
    def emit(self, record): ...
    def close(self): ...

class DatagramHandler(SocketHandler):
    closeOnError = ...  # type: Any
    def __init__(self, host, port) -> None: ...
    def makeSocket(self, timeout=...): ... # TODO: Actually does not have the timeout argument.
    def send(self, s): ...

class SysLogHandler(logging.Handler):
    LOG_EMERG = ...  # type: Any
    LOG_ALERT = ...  # type: Any
    LOG_CRIT = ...  # type: Any
    LOG_ERR = ...  # type: Any
    LOG_WARNING = ...  # type: Any
    LOG_NOTICE = ...  # type: Any
    LOG_INFO = ...  # type: Any
    LOG_DEBUG = ...  # type: Any
    LOG_KERN = ...  # type: Any
    LOG_USER = ...  # type: Any
    LOG_MAIL = ...  # type: Any
    LOG_DAEMON = ...  # type: Any
    LOG_AUTH = ...  # type: Any
    LOG_SYSLOG = ...  # type: Any
    LOG_LPR = ...  # type: Any
    LOG_NEWS = ...  # type: Any
    LOG_UUCP = ...  # type: Any
    LOG_CRON = ...  # type: Any
    LOG_AUTHPRIV = ...  # type: Any
    LOG_FTP = ...  # type: Any
    LOG_LOCAL0 = ...  # type: Any
    LOG_LOCAL1 = ...  # type: Any
    LOG_LOCAL2 = ...  # type: Any
    LOG_LOCAL3 = ...  # type: Any
    LOG_LOCAL4 = ...  # type: Any
    LOG_LOCAL5 = ...  # type: Any
    LOG_LOCAL6 = ...  # type: Any
    LOG_LOCAL7 = ...  # type: Any
    priority_names = ...  # type: Any
    facility_names = ...  # type: Any
    priority_map = ...  # type: Any
    address = ...  # type: Any
    facility = ...  # type: Any
    socktype = ...  # type: Any
    unixsocket = ...  # type: Any
    socket = ...  # type: Any
    formatter = ...  # type: Any
    def __init__(self, address=..., facility=..., socktype=...) -> None: ...
    def encodePriority(self, facility, priority): ...
    def close(self): ...
    def mapPriority(self, levelName): ...
    ident = ...  # type: Any
    append_nul = ...  # type: Any
    def emit(self, record): ...

class SMTPHandler(logging.Handler):
    username = ...  # type: Any
    fromaddr = ...  # type: Any
    toaddrs = ...  # type: Any
    subject = ...  # type: Any
    secure = ...  # type: Any
    timeout = ...  # type: Any
    def __init__(self, mailhost, fromaddr, toaddrs, subject, credentials=..., secure=...,
                 timeout=...): ...
    def getSubject(self, record): ...
    def emit(self, record): ...

class NTEventLogHandler(logging.Handler):
    appname = ...  # type: Any
    dllname = ...  # type: Any
    logtype = ...  # type: Any
    deftype = ...  # type: Any
    typemap = ...  # type: Any
    def __init__(self, appname, dllname=..., logtype=...) -> None: ...
    def getMessageID(self, record): ...
    def getEventCategory(self, record): ...
    def getEventType(self, record): ...
    def emit(self, record): ...
    def close(self): ...

class HTTPHandler(logging.Handler):
    host = ...  # type: Any
    url = ...  # type: Any
    method = ...  # type: Any
    secure = ...  # type: Any
    credentials = ...  # type: Any
    def __init__(self, host, url, method=..., secure=..., credentials=...) -> None: ...
    def mapLogRecord(self, record): ...
    def emit(self, record): ...

class BufferingHandler(logging.Handler):
    capacity = ...  # type: Any
    buffer = ...  # type: Any
    def __init__(self, capacity) -> None: ...
    def shouldFlush(self, record): ...
    def emit(self, record): ...
    def flush(self): ...
    def close(self): ...

class MemoryHandler(BufferingHandler):
    flushLevel = ...  # type: Any
    target = ...  # type: Any
    def __init__(self, capacity, flushLevel=..., target=...) -> None: ...
    def shouldFlush(self, record): ...
    def setTarget(self, target): ...
    buffer = ...  # type: Any
    def flush(self): ...
    def close(self): ...

class QueueHandler(logging.Handler):
    queue = ...  # type: Any
    def __init__(self, queue) -> None: ...
    def enqueue(self, record): ...
    def prepare(self, record): ...
    def emit(self, record): ...

class QueueListener:
    queue = ...  # type: Any
    handlers = ...  # type: Any
    def __init__(self, queue, *handlers) -> None: ...
    def dequeue(self, block): ...
    def start(self): ...
    def prepare(self, record): ...
    def handle(self, record): ...
    def enqueue_sentinel(self): ...
    def stop(self): ...
