tcpsockets/logger.py
def log(*args, files: List[TextIO] = None, **kwargs):
    """
    Write logs to console and multiple opened files simultaneously.
    Args:
        files(List[TextIO]): A list of opened file objects to log to. Overrides file keyword argument for print.
        args: same as print.
        kwargs: same as print.
    """
    if not logging:
        return
    if "file" in kwargs:
        if files is None:
            files = [kwargs["file"]]
        else:
            del kwargs["file"]
    else:
        if files is None:
            files = log_to
    
    for file in files:
        log_print(*args, file=file, **kwargs)
        file.flush()
        try:
            os.fsync(file.fileno())
        except OSError:
            pass

    Write logs to console and multiple opened files simultaneously.
    Args:
        files(List[TextIO]): A list of opened file objects to log to. Overrides file keyword argument for print.
        args: same as print.
        kwargs: same as print.
    
Write logs to console and multiple opened files simultaneously.
Write logs to console and multiple opened files simultaneously .
def log(*args, files: List[TextIO] = None, **kwargs):
    if not logging:
        return
    if "file" in kwargs:
        if files is None:
            files = [kwargs["file"]]
        else:
            del kwargs["file"]
    else:
        if files is None:
            files = log_to
    for file in files:
        log_print(*args, file=file, **kwargs)
        file.flush()
        try:
            os.fsync(file.fileno())
        except OSError:
            pass
def log ( * args , files : List [ TextIO ] = None , ** kwargs ) : if not logging : return if "file" in kwargs : if files is None : files = [ kwargs [ "file" ] ] else : del kwargs [ "file" ] else : if files is None : files = log_to for file in files : log_print ( * args , file = file , ** kwargs ) file . flush ( ) try : os . fsync ( file . fileno ( ) ) except OSError : pass
Write logs to console and multiple opened files simultaneously.
Write logs to console and multiple opened files simultaneously .
"""
    Write logs to console and multiple opened files simultaneously.
    Args:
        files(List[TextIO]): A list of opened file objects to log to. Overrides file keyword argument for print.
        args: same as print.
        kwargs: same as print.
    """
files
List[TextIO]
A list of opened file objects to log to. Overrides file keyword argument for print.
A list of opened file objects to log to . Overrides file keyword argument for print .
args
same as print.
same as print .
kwargs
same as print.
same as print .