   end
 
   def handle_call(request, _state) do
-    exit {:bad_call, request}
+    exit({:bad_call, request})
   end
 
   def handle_info(_msg, state) do


      # Mode is always async to avoid clogging the error_logger
      meta = [pid: ensure_pid(pid), error_logger: ensure_type(type)]
      :gen_event.notify(state.logger,
        {level, Process.group_leader(),
          {Logger, message, Logger.Utils.timestamp(utc_log?), meta}})
    end

    :ok

  defp ensure_pid(pid) when is_pid(pid), do: pid
  defp ensure_pid(_), do: self()

  defp check_threshold(state) do
    %{last_time: last_time, last_length: last_length, dropped: dropped, threshold: threshold} =
      state

    {m, s, _} = current_time = :os.timestamp()
    current_length = message_queue_length()

    cond do
      match?({^m, ^s, _}, last_time) and current_length - last_length > threshold ->
        count = drop_messages(current_time, 0)
        %{state | dropped: dropped + count, last_length: message_queue_length()}

      match?({^m, ^s, _}, last_time) ->
        state

      true ->
        if dropped > 0 do
          message =
            "Logger dropped #{dropped} OTP/SASL messages as it " <>
              "exceeded the amount of #{threshold} messages/second"

          Logger.warn(message)
        end

        %{state | dropped: 0, last_time: current_time, last_length: current_length}
    end
  end
