From a403ecc47e50da2163fcdf08f8e333ff607ec4d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rados=C5=82aw=20Szuma?= <56085570+Rados13@users.noreply.github.com> Date: Fri, 9 Feb 2024 15:36:13 +0100 Subject: [PATCH] Add logs about distributed configs (#149) --- lib/jellyfish/application.ex | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/jellyfish/application.ex b/lib/jellyfish/application.ex index 1fff257a..596c31cb 100644 --- a/lib/jellyfish/application.ex +++ b/lib/jellyfish/application.ex @@ -15,6 +15,10 @@ defmodule Jellyfish.Application do dist_config = Application.fetch_env!(:jellyfish, :dist_config) webrtc_config = Application.fetch_env!(:jellyfish, :webrtc_config) + Logger.info("Starting Jellyfish v#{@version}") + Logger.info("Distribution config: #{inspect(Keyword.delete(dist_config, :cookie))}") + Logger.info("WebRTC config: #{inspect(webrtc_config)}") + children = [ {Phoenix.PubSub, name: Jellyfish.PubSub}, @@ -50,10 +54,6 @@ defmodule Jellyfish.Application do Application.put_env(:jellyfish, :start_time, System.monotonic_time(:second)) - Logger.info("Starting Jellyfish v#{@version}") - Logger.info("Distribution config: #{inspect(Keyword.delete(dist_config, :cookie))}") - Logger.info("WebRTC config: #{inspect(webrtc_config)}") - result = Supervisor.start_link(children, opts) # If we do not set a default value for WebRTC metrics, @@ -72,7 +72,7 @@ defmodule Jellyfish.Application do end defp config_distribution(dist_config) do - ensure_epmd_started!() + :ok = ensure_epmd_started!() # When running JF not in a cluster and using # mix release, it starts in the distributed mode @@ -101,7 +101,7 @@ defmodule Jellyfish.Application do defp ensure_epmd_started!() do case System.cmd("epmd", ["-daemon"]) do - {_, 0} -> + {_output, 0} -> :ok _other ->