   end
   def handle_event({level, _group_leader, {Logger, message, timestamp, metadata}}, state) do
     if (not metadata[:application] in state.ignore_applications) or (level in state.ignore_levels) do
+      now = :erlang.system_time / 1_000_000_000
       metadata = metadata ++ [level: level, timestamp: timestamp]
       #IO.puts(inspect metadata)
-      IO.puts(
-          format(message, metadata, state.colors)
-        )
+      same_second=(now - state.last_t)>0.2
+      try do
+        IO.puts(
+            format(message, metadata, state.colors, same_second)
+          )
+      catch
+        e ->
+          IO.puts("Error printing line: #{message}, #{inspect message}: #{inspect e}")
+      rescue
+        e ->
+          IO.puts("Error printing line: #{message}, #{inspect message}: #{inspect e}")
+      end
+      {:ok, %{ state |
+        last_t: if not same_second do state.last_t else now end
+        }}
+    else
+      {:ok, state}
     end
 
-    {:ok, state}
   end
   def handle_event({:configure, opts}, _state) do
     IO.puts("Serverboards.Logger.Console configure: #{inspect opts}")

    if String.length(str) >= max do
      String.slice str, -max, max
    else
      String.pad_trailing str, max
    end
  end

  def format(msg, metadata, colors) do
    metadata=Map.to_list(Map.new(metadata)) # get latest, to get the overwritten file/line/function
    time = Logger.Utils.format_time( elem metadata[:timestamp], 1 )
    level = String.upcase(to_string metadata[:level])

        msg
      ]
    else
      msg = [[IO.ANSI.format_fragment([:bright, :blue, msg], true)], IO.ANSI.reset]
      [
        header,
        msg
      ]
    end
  end
  def format(msg, metadata, colors, show_time) when is_list(msg) do
    format(to_string(msg), metadata, colors, show_time)
  end
  def format(msg, metadata, colors, show_time) do
    format(inspect(msg), metadata, colors, show_time)
  end

  defp color_event(data, level, colors) do
    [IO.ANSI.format_fragment([ Map.get(colors, level, :normal), data], true), IO.ANSI.reset]
  end


  def init(_opts) do
    {:ok, %{ colors: colors, ignore_applications: ignore_applications, ignore_levels: ignore_levels, last_t: 0 }}
  end

  def handle_event(:flush, state) do
