def __init__(self, build_root, work_dir, log_level, log_dir=None, services=None):
    super(PantsDaemon, self).__init__(name='pantsd')
    self._logger = logging.getLogger(__name__)
    self._build_root = build_root
    self._work_dir = work_dir
    self._log_level = log_level
    self._log_dir = log_dir or os.path.join(work_dir, self.name)
    self._services = services or ()
    self._socket_map = {}
    # N.B. This Event is used as nothing more than a convenient atomic flag - nothing waits on it.
    self._kill_switch = threading.Event()
:param string build_root: The pants build root.
dataset/ETHPy150Open pantsbuild/pants/src/python/pants/pantsd/pants_daemon.py/PantsDaemon.__init__