anchor.diff:  -export([init/1, handle_call/2, handle_event/2, handle_info/2, terminate/2,
           code_change/3]).
   
  --record(state, {handle, level}).
  +-record(state, {handle, level, formatter, format_config}).
   
   -define(DEFAULT_FORMAT, [{pid, ""}, {module, [{pid, ["@"], ""}, module, {function, [":", function], ""}, {line, [":",line], ""}], ""}, " ", message]).
   -include_lib("lager/include/lager.hrl").
   
   %% @private
   init([Source, Level]) ->
  +    init([Source, Level, {lager_default_formatter, ?DEFAULT_FORMAT}]);
  +init([Source, Level, {Formatter, FormatterConfig}]) ->
       case nt_eventlog:register_event_source(Source) of
           {ok, Handle} ->
               {ok, #state{level=lager_util:level_to_num(Level),
  -                        handle = Handle}};
  +                        handle = Handle,
  +                        formatter = Formatter,
  +                        format_config = FormatterConfig}};
           Error ->
               Error
       end.
  
positive.code:     nt_eventlog:deregister_event_source(Handle).
  
  %% @private
  code_change(_OldVsn, State, _Extra) ->
      {ok, State}.
  
negative.code:     #state{handle = Handle, level = LogLevel} = State) when Level =< LogLevel ->
      nt_eventlog:report_event(Handle, Level, lists:flatten([Location, Message])),
      {ok, State};
  handle_event({log, Message}, #state{handle = Handle, level = Level, formatter = Formatter, format_config = FormatConfig} = State) ->
      case lager_util:is_loggable(Message, Level, ?MODULE) of
          true ->
              nt_eventlog:report_event(Handle, Level, Formatter:format(Message, FormatConfig)),
              {ok, State};
          false ->
              {ok, State}
  