def __init__(self, watchman_path, metadata_base_dir, log_level='1', startup_timeout=STARTUP_TIMEOUT_SECONDS,
               timeout=SOCKET_TIMEOUT_SECONDS, socket_path_override=None):
    """
    :param str watchman_path: The path to the watchman binary.
    :param str metadata_base_dir: The metadata base dir for `ProcessMetadataManager`.
    :param float startup_timeout: The timeout for the initial `watch-project` query (in seconds).
    :param float timeout: The watchman socket timeout for all subsequent queries (in seconds).
    :param str log_level: The watchman log level. Watchman has 3 log levels: '0' for no logging,
                          '1' for standard logging and '2' for verbose logging.
    :param str socket_path_override: The overridden target path of the watchman socket, if any.
    """
    super(Watchman, self).__init__(name='watchman',
                                   process_name='watchman',
                                   socket_type=str,
                                   metadata_base_dir=metadata_base_dir)
    self._watchman_path = self._normalize_watchman_path(watchman_path)
    self._watchman_work_dir = os.path.join(metadata_base_dir, self.name)
    self._log_level = log_level
    self._startup_timeout = startup_timeout
    self._timeout = timeout

    self._state_file = os.path.join(self._watchman_work_dir, '{}.state'.format(self.name))
    self._log_file = os.path.join(self._watchman_work_dir, '{}.log'.format(self.name))
    self._pid_file = os.path.join(self._watchman_work_dir, '{}.pid'.format(self.name))
    self._sock_file = socket_path_override or os.path.join(self._watchman_work_dir,
                                                           '{}.sock'.format(self.name))

    self._logger = logging.getLogger(__name__)
    self._watchman_client = None
def __init__ ( self , watchman_path , metadata_base_dir , log_level = '1' , startup_timeout = STARTUP_TIMEOUT_SECONDS , timeout = SOCKET_TIMEOUT_SECONDS , socket_path_override = None ) : super ( Watchman , self ) . __init__ ( name = 'watchman' , process_name = 'watchman' , socket_type = str , metadata_base_dir = metadata_base_dir ) self . _watchman_path = self . _normalize_watchman_path ( watchman_path ) self . _watchman_work_dir = os . path . join ( metadata_base_dir , self . name ) self . _log_level = log_level self . _startup_timeout = startup_timeout self . _timeout = timeout self . _state_file = os . path . join ( self . _watchman_work_dir , '{}.state' . format ( self . name ) ) self . _log_file = os . path . join ( self . _watchman_work_dir , '{}.log' . format ( self . name ) ) self . _pid_file = os . path . join ( self . _watchman_work_dir , '{}.pid' . format ( self . name ) ) self . _sock_file = socket_path_override or os . path . join ( self . _watchman_work_dir , '{}.sock' . format ( self . name ) ) self . _logger = logging . getLogger ( __name__ ) self . _watchman_client = None
:param str watchman_path: The path to the watchman binary.
    :param str metadata_base_dir: The metadata base dir for `ProcessMetadataManager`.
    :param float startup_timeout: The timeout for the initial `watch-project` query (in seconds).
    :param float timeout: The watchman socket timeout for all subsequent queries (in seconds).
    :param str log_level: The watchman log level. Watchman has 3 log levels: '0' for no logging,
                          '1' for standard logging and '2' for verbose logging.
    :param str socket_path_override: The overridden target path of the watchman socket, if any.