title: client/server logging module timeout for SocketHandler
body: <p>I'm implementing python <code>logging</code> module using the <code>SocketHandler</code> to log messages from multiple remote machines.</p>
  
  <p><strong>Client Part:</strong> </p>
  
  <pre><code>    ......
  
      if self.loggerHost == "localhost":
          self.loggerHost = socket.gethostname()
      .......
  
      self.logger = logging.getLogger(self.handleName)
  
      self.logger.setLevel(logging.DEBUG)
  
      numberOfHandles = len(self.logger.handlers)
  
      # are there no handles in the logger
      if numberOfHandles == 0:
  
          self.loggerPort = logging.handlers.DEFAULT_TCP_LOGGING_PORT
  
          self.socketHandler = logging.handlers.SocketHandler(self.loggerHost, self.loggerPort)
  
          self.logger.addHandler(self.socketHandler)
  
      ......
  
      # send the new handle to Handle table 
      self.__NewHandle(paramsDict=paramDict)
  </code></pre>
  
  <p>The <code>__NewHandle</code> Method creates a new log:</p>
  
  <pre><code>def __NewHandle(self, paramsDict):
  
          .......
  
          # update logger with new log! (trace)
          self.logger.debug(xmlString)
  </code></pre>
  
  <p><strong>Server Part:</strong></p>
  
  <pre><code> while not self.abort:
  
       rd, wr, ex = select.select([self.socket.fileno()],
                                         [], [],
                                         self.timeout)
  
       # we have a read list available to read and process
       if rd:
           self.handle_request()
  
       .......
  </code></pre>
  
  <p><strong>Question:</strong></p>
  
  <p>When the server is available everything works grate and each log is recorded very fast ~0.1 [mS] BUT when the server is unavailable, logging is slow and the first log can take up to 1 [sec] This is unacceptable for production.</p>
  
  <p>I can't find any <code>attribute</code> at the python docs that controls the timeout of the logging (<strong>client side</strong>) </p>
  
  <p>So if i'll use <code>logger.debug("....")</code> it won't take too much time.</p>
  
  <p>does any one know how can i set a timeout for the logging action? or even better to ignore it if there is no response for the server? </p>