 
   It should just keep running.
   """
+
+  require Logger
 
   def start do
     GenServer.start(__MODULE__, [])

    {:noreply, port}
  end

  def terminate(thing, state) do
    IO.inspect thing, label: "first arg"
    IO.inspect state, label: "state"
  end
end

  ## Server callbacks

  def init([]) do
    port = Port.open({:spawn_executable, :code.priv_dir(:nerves_dnssd) ++ '/sbin/mdnsd'}, [:exit_status, :stderr_to_stdout, args: ['-debug'], line: 256])
    {:ok, port}
  end

  def handle_info({_port, {:data, {:eol, 'ERROR: ' ++ message}}}, port) do
    Logger.error message
    {:noreply, port}
  end

  def handle_info({_port, {:data, {:eol, 'WARNING: ' ++ message}}}, port) do
    Logger.warn message
    {:noreply, port}
  end

  def handle_info({_port, {:data, {:eol, message}}}, port) do
    Logger.info message
    {:noreply, port}
  end

