def log_handler(self, handler):
        """Setter for the log handler function.

        Args:
          self (JLink): the ``JLink`` instance

        Returns:
          ``None``
        """
        if not self.opened():
            handler = handler or util.noop
            self._log_handler = enums.JLinkFunctions.LOG_PROTOTYPE(handler)
            self._dll.JLINKARM_EnableLog(self._log_handler)
Setter for the log handler function.

        Args:
          self (JLink): the ``JLink`` instance

        Returns:
          ``None``