code: def socket_handler(name, logname, host, port):
      
  
      return wrap_log_handler(logging.handlers.SocketHandler(host, port))
docs: A Bark logging handler logging output to a stream (TCP) socket.
      The server listening at the given 'host' and 'port' will be sent a
      pickled dictionary.
  
      Similar to logging.handlers.SocketHandler.