diff options
Diffstat (limited to 'deps/lager/src/lager.app.src')
-rw-r--r-- | deps/lager/src/lager.app.src | 45 |
1 files changed, 32 insertions, 13 deletions
diff --git a/deps/lager/src/lager.app.src b/deps/lager/src/lager.app.src index 18bbadd..d6d6355 100644 --- a/deps/lager/src/lager.app.src +++ b/deps/lager/src/lager.app.src @@ -3,25 +3,33 @@ {application, lager, [ {description, "Erlang logging framework"}, - {vsn, git}, + {vsn, "3.0.1"}, {modules, []}, {applications, [ kernel, stdlib, - compiler, - syntax_tools + goldrush ]}, - {registered, []}, + {registered, [lager_sup, lager_event, lager_crash_log, lager_handler_watcher_sup]}, {mod, {lager_app, []}}, {env, [ - %% What handlers to install with what arguments - {handlers, [ - {lager_console_backend, info}, - {lager_file_backend, [ - {"log/error.log", error, 10485760, "$D0", 5}, - {"log/console.log", info, 10485760, "$D0", 5} - ]} + %% Note: application:start(lager) overwrites previously defined environment variables + %% thus declaration of default handlers is done at lager_app.erl + + %% What colors to use with what log levels + {colored, false}, + {colors, [ + {debug, "\e[0;38m" }, + {info, "\e[1;37m" }, + {notice, "\e[1;36m" }, + {warning, "\e[1;33m" }, + {error, "\e[1;31m" }, + {critical, "\e[1;35m" }, + {alert, "\e[1;44m" }, + {emergency, "\e[1;41m" } + ]}, + %% Whether to write a crash log, and where. Undefined means no crash logger. {crash_log, "log/crash.log"}, %% Maximum size in bytes of events in the crash log - defaults to 65536 @@ -35,7 +43,18 @@ %% Number of rotated crash logs to keep, 0 means keep only the %% current one - default is 0 {crash_log_count, 5}, - %% Whether to redirect error_logger messages into lager - defaults to true - {error_logger_redirect, true} + %% Whether to redirect error_logger messages into the default lager_event sink - defaults to true + {error_logger_redirect, true}, + %% How many messages per second to allow from error_logger before we start dropping them + {error_logger_hwm, 50}, + %% How big the gen_event mailbox can get before it is + %% switched into sync mode. This value only applies to + %% the default sink; extra sinks can supply their own. + {async_threshold, 20}, + %% Switch back to async mode, when gen_event mailbox size + %% decrease from `async_threshold' to async_threshold - + %% async_threshold_window. This value only applies to the + %% default sink; extra sinks can supply their own. + {async_threshold_window, 5} ]} ]}. |