     end
   end
 
-  defp normalize_message(fun, metadata) when is_function(fun, 0),
-    do: normalize_message(fun.(), metadata)
-  defp normalize_message({message, fun_metadata}, metadata) when is_list(fun_metadata),
-    do: {message, Keyword.merge(metadata, fun_metadata)}
-  defp normalize_message(message, metadata),
-    do: {message, metadata}
-
-  defp truncate(data, n) when is_list(data) or is_binary(data),
-    do: Logger.Utils.truncate(data, n)
-  defp truncate(data, n),
-    do: Logger.Utils.truncate(to_string(data), n)
+  defp normalize_message(fun, metadata) when is_function(fun, 0) do
+    normalize_message(fun.(), metadata)
+  end
+
+  defp normalize_message({message, fun_metadata}, metadata) when is_list(fun_metadata) do
+    {message, Keyword.merge(metadata, fun_metadata)}
+  end
+
+  defp normalize_message(message, metadata), do: {message, metadata}
+
+  defp truncate(data, n) when is_list(data) or is_binary(data), do: Logger.Utils.truncate(data, n)
+  defp truncate(data, n), do: Logger.Utils.truncate(to_string(data), n)
 
   defp form_fa({name, arity}) do
     Atom.to_string(name) <> "/" <> Integer.to_string(arity)

    # anyways). We only want the variables that figure in `caller.vars`, as the
    # AST for calls to local 0-arity functions without parens is the same as the
    # AST for variables.
    {^data, logged_vars} = Macro.postwalk(data, [], fn
      {name, _meta, nil} = var, acc when is_atom(name) ->
        if {name, nil} in caller.vars, do: {var, [name | acc]}, else: {var, acc}
      ast, acc ->
        {ast, acc}
    end)

    assignments =
      logged_vars

  and how to process the existing options.
  """

  @type backend :: :gen_event.handler()
  @type message :: IO.chardata() | String.Chars.t()
  @type level :: :error | :info | :warn | :debug
  @type metadata :: keyword(String.Chars.t())
  @levels [:error, :info, :warn, :debug]

  @metadata :logger_metadata
