     :none
   end
 
-  defp translate_supervisor(min_level,
-                            [supervisor: sup, errorContext: context,
-                             reason: reason,
-                             offender: [{:pid, pid}, {name_or_id, name} | offender]])
+  defp translate_supervisor(
+         min_level,
+         supervisor: sup,
+         errorContext: context,
+         reason: reason,
+         offender: [{:pid, pid}, {name_or_id, name} | offender]
+       )
        when is_pid(pid) and context !== :shutdown and name_or_id in [:name, :id] do
-    {:ok, ["Child ", inspect(name), " of Supervisor ",
-            sup_name(sup), ?\s, sup_context(context),
-            "\n** (exit) ", offender_reason(reason, context),
-            "\nPid: ", inspect(pid) |
-            child_info(min_level, offender)]}
-  end
-
-  defp translate_supervisor(min_level,
-                            [supervisor: sup, errorContext: context,
-                             reason: reason,
-                             offender: [{:pid, _pid},
-                                        {name_or_id, name} | offender]]) when name_or_id in [:name, :id] do
-    {:ok, ["Child ", inspect(name), " of Supervisor ",
-           sup_name(sup), ?\s, sup_context(context),
-           "\n** (exit) ", offender_reason(reason, context) |
-           child_info(min_level, offender)]}
-  end
-
-  defp translate_supervisor(min_level,
-                            [supervisor: sup, errorContext: context,
-                             reason: reason,
-                             offender: [{:pid, pid} | offender]]) do
-    {:ok, ["Child of Supervisor ",
-           sup_name(sup), ?\s, sup_context(context),
-           "\n** (exit) ", offender_reason(reason, context),
-           "\nPid: ", inspect(pid) |
-           child_info(min_level, offender)]}
-  end
-
-  defp translate_supervisor(min_level,
-                            [supervisor: sup, errorContext: context,
-                             reason: reason,
-                             offender: [{:nb_children, n},
-                                        {name_or_id, name} | offender]]) when name_or_id in [:name, :id] do
-    {:ok, ["Children ", inspect(name), " of Supervisor ",
-           sup_name(sup), ?\s, sup_context(context),
-           "\n** (exit) ", offender_reason(reason, context),
-           "\nNumber: ", inspect(n) |
-           child_info(min_level, offender)]}
+    msg =
+      ["Child ", inspect(name), " of Supervisor ", sup_name(sup)] ++
+        [?\s, sup_context(context), "\n** (exit) "] ++
+        [offender_reason(reason, context), "\nPid: ", inspect(pid)] ++
+        child_info(min_level, offender)
+
+    {:ok, msg}
+  end
+
+  defp translate_supervisor(
+         min_level,
+         supervisor: sup,
+         errorContext: context,
+         reason: reason,
+         offender: [{:pid, _pid}, {name_or_id, name} | offender]
+       )
+       when name_or_id in [:name, :id] do
+    msg =
+      ["Child ", inspect(name), " of Supervisor ", sup_name(sup)] ++
+        [?\s, sup_context(context), "\n** (exit) ", offender_reason(reason, context)] ++
+        child_info(min_level, offender)
+
+    {:ok, msg}
+  end
+
+  defp translate_supervisor(
+         min_level,
+         supervisor: sup,
+         errorContext: context,
+         reason: reason,
+         offender: [{:pid, pid} | offender]
+       ) do
+    msg =
+      ["Child of Supervisor ", sup_name(sup), ?\s, sup_context(context), "\n** (exit) "] ++
+        [offender_reason(reason, context), "\nPid: ", inspect(pid)] ++
+        child_info(min_level, offender)
+
+    {:ok, msg}
+  end
+
+  defp translate_supervisor(
+         min_level,
+         supervisor: sup,
+         errorContext: context,
+         reason: reason,
+         offender: [{:nb_children, n}, {name_or_id, name} | offender]
+       )
+       when name_or_id in [:name, :id] do
+    msg =
+      ["Children ", inspect(name), " of Supervisor ", sup_name(sup), ?\s, sup_context(context)] ++
+        ["\n** (exit) ", offender_reason(reason, context), "\nNumber: ", inspect(n)] ++
+        child_info(min_level, offender)
+
+    {:ok, msg}
   end
 
   defp translate_supervisor(_min_level, _other), do: :none
 
-  defp translate_progress(_min_level,
-                          [application: app, started_at: node_name]) do
+  defp translate_progress(_min_level, application: app, started_at: node_name) do
     {:ok, ["Application ", to_string(app), " started at " | inspect(node_name)]}
   end
 
-  defp translate_progress(min_level,
-                          [supervisor: sup,
-                           started: [{:pid, pid}, {name_or_id, name} | started]]) when name_or_id in [:name, :id] do
-    {:ok, ["Child ", inspect(name), " of Supervisor ",
-           sup_name(sup), " started",
-           "\nPid: ", inspect(pid) |
-           child_info(min_level, started)]}
-  end
-
-  defp translate_progress(min_level,
-                          [supervisor: sup,
-                           started: [{:pid, pid} | started]]) do
-    {:ok, ["Child of Supervisor ", sup_name(sup), " started",
-           "\nPid: ", inspect(pid) |
-           child_info(min_level, started)]}
+  defp translate_progress(
+         min_level,
+         supervisor: sup,
+         started: [{:pid, pid}, {name_or_id, name} | started]
+       )
+       when name_or_id in [:name, :id] do
+    msg =
+      ["Child ", inspect(name), " of Supervisor ", sup_name(sup)] ++
+        [" started", "\nPid: ", inspect(pid)] ++ child_info(min_level, started)
+
+    {:ok, msg}
+  end
+
+  defp translate_progress(
+         min_level,
+         supervisor: sup,
+         started: [{:pid, pid} | started]
+       ) do
+    msg =
+      ["Child of Supervisor ", sup_name(sup), " started", "\nPid: ", inspect(pid)] ++
+        child_info(min_level, started)
+
+    {:ok, msg}
   end
 
   defp translate_progress(_min_level, _other), do: :none


    case message do
      {'** Generic server ' ++ _, [name, last, state, reason | client]} ->
        msg = ["GenServer #{inspect name} terminating", format_stop(reason),
               "\nLast message#{format_from(client)}: #{inspect last, opts}"]
        if min_level == :debug do
          {:ok, [msg, "\nState: #{inspect state, opts}" |
                 format_client(client)]}
        else
          {:ok, msg}
        end

      {'** gen_event handler ' ++ _, [name, manager, last, state, reason]} ->
        msg = ["GenEvent handler #{inspect name} installed in #{inspect manager} terminating",
               format_stop(reason), "\nLast message: #{inspect last, opts}"]
        if min_level == :debug do
          {:ok, [msg | "\nState: #{inspect state, opts}"]}
        else
          {:ok, msg}
        end

      {'** Task ' ++ _, [name, starter, function, args, reason]} ->
        msg = ["Task #{inspect name} started from #{inspect starter} terminating",
               format_stop(reason),
               "\nFunction: #{inspect function, opts}" |
               "\n    Args: #{inspect args, opts}"]
        {:ok, msg}

      {'Error in process ' ++ _, [pid, {reason, stack}]} ->
        msg = ["Process ", inspect(pid), " raised an exception" |
               format(:error, reason, stack)]
        {:ok, msg}

      _ ->


  defp crash_debug(:current_stacktrace, stack, prefix) do
    stack_prefix = [prefix | "    "]
    stacktrace = Enum.map(stack, &[stack_prefix | Exception.format_stacktrace_entry(&1)])

    [prefix, "Current Stacktrace:" | stacktrace]
  end

  defp crash_debug(key, value, prefix) do
