 Attempt to redress test failures.
At this point in the work, the killer will correctly stop the
DEFAULT_SINK in the event of overload but our friend never comes back
up and lager stops working past this point.
Oops!
Error message:
=SUPERVISOR REPORT==== 10-Mar-2016::16:18:11 ===
Supervisor: {local,lager_handler_watcher_sup}
Context: child_terminated
Reason: killed
Offender: [{pid,<0.63.0>},
{id,lager_handler_watcher},
{mfargs,{lager_handler_watcher,start_link,undefined}},
{restart_type,temporary},
{shutdown,5000},
{child_type,worker}]
=SUPERVISOR REPORT==== 10-Mar-2016::16:18:11 ===
Supervisor: {local,lager_handler_watcher_sup}
Context: child_terminated
Reason: killed
Offender: [{pid,<0.59.0>},
{id,lager_handler_watcher},
{mfargs,{lager_handler_watcher,start_link,undefined}},
{restart_type,temporary},
{shutdown,5000},
{child_type,worker}]
=PROGRESS REPORT==== 10-Mar-2016::16:18:11 ===
supervisor: {local,lager_sup}
started: [{pid,<0.113.0>},
{id,lager},
{mfargs,{gen_event,start_link,[{local,lager_event}]}},
{restart_type,permanent},
{shutdown,5000},
{child_type,worker}]
Signed-off-by: Brian L. Troutwine <brian@troutwine.us>
9 роки тому |
|
- -module(lager_slow_backend).
- -author("Sungjin Park <jinni.park@gmail.com>").
- -behavior(gen_event).
-
- -export([init/1, handle_call/2, handle_event/2, handle_info/2, terminate/2, code_change/3]).
-
- -include("lager.hrl").
-
- -record(state, {
- delay :: non_neg_integer()
- }).
-
- init([{delay, Delay}]) ->
- {ok, #state{delay=Delay}}.
-
- handle_call(get_loglevel, State) ->
- {ok, lager_util:config_to_mask(debug), State};
- handle_call(_Request, State) ->
- {ok, ok, State}.
-
- handle_event({log, _Message}, State) ->
- timer:sleep(State#state.delay),
- {ok, State};
- handle_event(_Event, State) ->
- {ok, State}.
-
- handle_info(_Info, State) ->
- {ok, State}.
-
- terminate(_Reason, _State) ->
- ok.
-
- code_change(_OldVsn, State, _Extra) ->
- {ok, State}.
|