       pid
     end
 
-    header= (
-      "#{time} [#{String.pad_trailing level, 5}] [#{rpad fileline, 30} / #{String.pad_trailing pid, 10}] "
-        |> color_event(metadata[:level], colors)
-      )
-    header = ["\r", String.pad_trailing(to_string(header), 80)]
+    time = if show_time do
+      time
+    else
+      "            "
+    end
+    header = "#{time} [#{String.pad_trailing level, 5}] [#{rpad fileline, 30} / #{String.pad_trailing pid, 10  }] "
+      |> color_event(metadata[:level], colors)
+    header = ["\r", String.pad_trailing(to_string(header), 75)]
+
+    columns = case :io.columns do
+      {:ok, columns} -> columns
+      _ -> 120
+    end
+    msg = if String.length(msg) > (columns - 75) do
+      split_blocks(msg, 67, (columns - 75))
+    else
+      msg
+    end
 
     if is_pid(metadata[:pid]) do
       [

    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])

  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)
      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

  end
  def handle_event({:configure, opts}, _state) do
    IO.puts("Serverboards.Logger.Console configure: #{inspect opts}")
