From f433da014b92ef2e47fcdaf6a932eef07f3e00a7 Mon Sep 17 00:00:00 2001 From: Mattias Jansson Date: Mon, 15 Sep 2014 16:04:52 +0200 Subject: [PATCH] Mention the color atom for the formatter config --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index 5d234c8..e803d79 100644 --- a/README.md +++ b/README.md @@ -305,6 +305,17 @@ add To lager's application environment config. If you don't like the default colors, they are also configurable, see the app.src file for more details. +The output will be colored from the first occurrence of the atom color +in the formatting configuration. For example: + +```erlang +{lager_console_backend, [info, {lager_default_formatter, [time, color, " [",severity,"] ", message, "\e[0m\r\n"]}]} +``` + +This will make the entire log message, except time, colored. The +escape sequence before the line break is needed in order to reset the +color after each log message. + Tracing ------- Lager supports basic support for redirecting log messages based on log message