<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def define_log_pre_format_hooks(self):
 """ adds a hook to send to websocket if the run command was selected """

        hooks = super(Server, self).define_log_pre_format_hooks()
        # NOTE enabling logs only on debug mode
        if self.args.func == self.run and self.args.debug:
            hooks.append(self._send_log_to_ws)

        return hooks