code: def find_syslog_address():
      
      if sys.platform == 'darwin' and os.path.exists(LOG_DEVICE_MACOSX):
          return LOG_DEVICE_MACOSX
      elif os.path.exists(LOG_DEVICE_UNIX):
          return LOG_DEVICE_UNIX
      else:
          return 'localhost', logging.handlers.SYSLOG_UDP_PORT
docs: Find the most suitable destination for system log messages.
  
      :returns: The pathname of a log device (a string) or an address/port tuple as
                supported by :class:`~logging.handlers.SysLogHandler`.
  
      On Mac OS X this prefers :data:`LOG_DEVICE_MACOSX`, after that :data:`LOG_DEVICE_UNIX`
      is checked for existence. If both of these device files don't exist the default used
      by :class:`~logging.handlers.SysLogHandler` is returned.