   ## Server callbacks
 
   def init([]) do
-    port = Port.open({:spawn_executable, :code.priv_dir(:nerves_dnssd) ++ '/sbin/mdnsd'}, [:exit_status, args: ['-debug']])
+    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({_, {:data, {:eol, message}}}, port) do
-    IO.inspect message, label: "mdnsd"
+  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
 


  It should just keep running.
  """

  def start do
    GenServer.start(__MODULE__, [])

    {:noreply, port}
  end

  def terminate(_error, port) do
    Port.close(port)
  end
end
