anchor.diff:  %% configures lager trace files.
   %% @end
   -spec init(Args :: term()) -> Result when
  -  Result :: {ok, term()}.
  +    Result :: {ok, term()}.
   %% ====================================================================
   init(_) ->
  -  ets:new(subscribers_ets, [named_table, public, bag, {read_concurrency, true}]),
  -  % change trace console to omit duplicate logs
  -  gen_event:delete_handler(lager_event, lager_console_backend, []),
  -  supervisor:start_child(lager_handler_watcher_sup, [lager_event, lager_console_backend,
  -    [info, {lager_default_formatter, [{destination, "", [time," [",severity,"] ", message, "\n"]}]}]]),
  -
  -  % remove standard file traces
  -  gen_event:delete_handler(lager_event, {lager_file_backend, "log/debug.log"}, []),
  -  gen_event:delete_handler(lager_event, {lager_file_backend, "log/info.log"}, []),
  -  gen_event:delete_handler(lager_event, {lager_file_backend, "log/error.log"}, []),
  -
  -  %  install proper file traces for a central_logger
  -  install_trace_file("log/debug.log", debug, 10485760, "$D0", 10, [{destination, local}], false),
  -  install_trace_file("log/info.log", info, 104857600, "$W5D23", 100, [{destination, local}], false),
  -  install_trace_file("log/error.log", error, 1048576000, "$M1D1", 1000, [{destination, local}], false),
  -
  -  install_trace_file("log/global_debug.log", debug, 10485760, "$D0", 10, [{destination, '*'}], true),
  -  install_trace_file("log/global_info.log", info, 104857600, "$W5D23", 100, [{destination, '*'}], true),
  -  install_trace_file("log/global_error.log", error, 1048576000, "$M1D1", 1000, [{destination, '*'}], true),
  -
  -  ok.
  +    ets:new(subscribers_ets, [named_table, public, bag, {read_concurrency, true}]),
  +    % change trace console to omit duplicate logs
  +    gen_event:delete_handler(lager_event, lager_console_backend, []),
  +    supervisor:start_child(lager_handler_watcher_sup, [lager_event, lager_console_backend,
  +        [info, {lager_default_formatter, [{destination, "", [time, " [", severity, "] ", message, "\n"]}]}]]),
  +
  +    % remove standard file traces
  +    gen_event:delete_handler(lager_event, {lager_file_backend, "log/debug.log"}, []),
  +    gen_event:delete_handler(lager_event, {lager_file_backend, "log/info.log"}, []),
  +    gen_event:delete_handler(lager_event, {lager_file_backend, "log/error.log"}, []),
  +
  +    %  install proper file traces for a central_logger
  +    install_trace_file("log/debug.log", debug, 10485760, "$D0", 10, [{destination, local}], false),
  +    install_trace_file("log/info.log", info, 104857600, "$W5D23", 100, [{destination, local}], false),
  +    install_trace_file("log/error.log", error, 1048576000, "$M1D1", 1000, [{destination, local}], false),
  +
  +    install_trace_file("log/global_debug.log", debug, 10485760, "$D0", 10, [{destination, '*'}], true),
  +    install_trace_file("log/global_info.log", info, 104857600, "$W5D23", 100, [{destination, '*'}], true),
  +    install_trace_file("log/global_error.log", error, 1048576000, "$M1D1", 1000, [{destination, '*'}], true),
  +
  +    ok.
   
   
   %% handle/2
   %% ====================================================================
   %% @doc {@link worker_plugin_behaviour} callback handle/1
   -spec handle(ProtocolVersion :: term(), Request) -> Result when
  -  Request :: ping | healthcheck | get_version | {subscribe, Subscriber} |
  +    Request :: ping | healthcheck | get_version | {subscribe, Subscriber} |
       {unsubscribe, Subscriber} | {dispatch_log, Message, Timestamp, Severity, Metadata},
  -  Result :: ok | {ok, Response} | {error, Error} | pong | Version,
  -  Subscriber :: pid(),
  -  Message :: string(),
  -  Timestamp :: term(),
  -  Severity :: atom(),
  -  Metadata :: list(),
  -  Response :: term(),
  -  Version :: term(),
  -  Error :: term().
  +    Result :: ok | {ok, Response} | {error, Error} | pong | Version,
  +    Subscriber :: pid(),
  +    Message :: string(),
  +    Timestamp :: term(),
  +    Severity :: atom(),
  +    Metadata :: list(),
  +    Response :: term(),
  +    Version :: term(),
  +    Error :: term().
   %% ====================================================================
   handle(_ProtocolVersion, ping) ->
  -  pong;
  +    pong;
   
   handle(_ProtocolVersion, healthcheck) ->
  -	ok;
  +    ok;
   
   handle(_ProtocolVersion, get_version) ->
  -  node_manager:check_vsn();
  +    node_manager:check_vsn();
   
   handle(_ProtocolVersion, {subscribe, Subscriber}) ->
  -  add_subscriber(Subscriber);
  +    add_subscriber(Subscriber);
   
   handle(_ProtocolVersion, get_subscribers) ->
  -  get_subscribers();
  +    get_subscribers();
   
   handle(_ProtocolVersion, {unsubscribe, Subscriber}) ->
  -  remove_subscriber(Subscriber);
  +    remove_subscriber(Subscriber);
   
   handle(_ProtocolVersion, {dispatch_log, Message, Timestamp, Severity, Metadata}) ->
  -  dispatch_log(Message, Timestamp, Severity, Metadata);
  +    dispatch_log(Message, Timestamp, Severity, Metadata);
   
   handle(_ProtocolVersion, _Request) ->
  -  wrong_request.
  +    wrong_request.
   
   %% cleanup/0
   %% ====================================================================
  
positive.code: %% Reconfigures lager back to standard
  %% @end
  -spec cleanup() -> Result when
    Result :: ok | {error, Error},
    Error :: timeout | term().
  %% ====================================================================
  cleanup() ->
    % Delete ets table
    ets:delete(subscribers_ets),
  
    % Restart lager completely, which will remove all traces and install default ones
    application:stop(lager),
    application:load(lager),
    lager:start(),
  
  	ok.
  
  %% ====================================================================
  %% Internal functions
  
negative.code: %% central logging functionalities.
  %% @end
  %% ===================================================================
  -module(central_logger).
  -behaviour(worker_plugin_behaviour).
  
  -include("logging.hrl")
  
  %% ====================================================================
  %% API functions
  