Browse files

Add an update to the global loglevel when a new handler is installed.

This fixes a bug where messages were incorrectly discarded if the new
handler is using log levels that are different from those in use by handlers
that were set up at start-of-day.
  • Loading branch information...
1 parent 228f2b9 commit df90ea05cf7c15e5825ae2df0c4a19229a1e7645 @ewanmellor ewanmellor committed Mar 5, 2013
Showing with 1 addition and 0 deletions.
  1. +1 −0 src/lager_handler_watcher.erl
@@ -88,6 +88,7 @@ install_handler(Event, Module, Config) ->
case gen_event:add_sup_handler(Event, Module, Config) of
ok ->
_ = lager:log(debug, self(), "Lager installed handler ~p into ~p", [Module, Event]),
+ lager:update_loglevel_config(),
Error ->
%% try to reinstall it later

0 comments on commit df90ea0

Please sign in to comment.