From f38163aa64547e09f99e362edefeda713e06ddb7 Mon Sep 17 00:00:00 2001
From: Siri Hansen  The function is called when an new handler is about to be
 	  added, and the purpose is to verify the configuration and
 	  initiate all resources needed by the handler. The handler identity is associated with the  If everything succeeds, the callback function can add
 	  possible default values or internal state values to the
 	  configuration, and return the adjusted map
@@ -905,11 +905,9 @@ logger:set_process_metadata(maps:merge(logger:get_process_metadata(),Meta)).
     
The handler identity is associated with the 
If everything succeeds, the callback function must return a
 	  possibly adjusted configuration in 
If the configuration is faulty, the callback function must @@ -942,6 +942,8 @@ logger:set_process_metadata(maps:merge(logger:get_process_metadata(),Meta)).
The function is called when all global filters and all handler filters for the handler in question have passed for the given log event.
+The handler identity is associated with the 
The handler must log the event.
The return value from this function is ignored by Logger.
@@ -949,11 +951,9 @@ logger:set_process_metadata(maps:merge(logger:get_process_metadata(),Meta)).This callback function is optional.
The function is called when a handler is about to be removed, and the purpose is to release all resources used by - the handler. The return value is ignored by Logger.
+ the handler. +The handler identity is associated with the 
The return value is ignored by Logger.
In addition to the mandatory callback function log(logger:log(),logger:config()) ->ok
     
It may also implement the following callbacks:
-adding_handler(logger:handler_id(),logger:config()) -> {ok,logger:config()} | {error,term()}
-removing_handler(logger:handler_id(),logger:config()) -> ok
-changing_config(logger:handler_id(),logger:config(),logger:config()) -> {ok,logger:config()} | {error,term()}
+adding_handler(logger:config()) -> {ok,logger:config()} | {error,term()}
+removing_handler(logger:config()) -> ok
+changing_config(logger:config(),logger:config()) -> {ok,logger:config()} | {error,term()}
     
     When 
A handler can be removed by calling
       
When 
 -module(myhandler).
--export([adding_handler/2, removing_handler/2, log/2]).
+-export([adding_handler/1, removing_handler/1, log/2]).
 -export([init/1, handle_call/3, handle_cast/2, terminate/2]).
 
-adding_handler(Id,Config) ->
+adding_handler(Config) ->
     {ok,Fd} = file:open(File,[append,{encoding,utf8}]),
     {ok,Config#{myhandler_fd=>Fd}}.
 
-removing_handler(Id,#{myhandler_fd:=Fd}) ->
+removing_handler(#{myhandler_fd:=Fd}) ->
     _ = file:close(Fd),
     ok.
 
@@ -800,14 +800,14 @@ log(Log,#{myhandler_fd:=Fd,formatter:={FModule,FConfig}}) ->
       single process.
     
 -module(myhandler).
--export([adding_handler/2, removing_handler/2, log/2]).
+-export([adding_handler/1, removing_handler/1, log/2]).
 -export([init/1, handle_call/3, handle_cast/2, terminate/2]).
 
-adding_handler(Id,Config) ->
+adding_handler(Config) ->
     {ok,Pid} = gen_server:start(?MODULE,Config),
     {ok,Config#{myhandler_pid=>Pid}}.
 
-removing_handler(Id,#{myhandler_pid:=Pid}) ->
+removing_handler(#{myhandler_pid:=Pid}) ->
     gen_server:stop(Pid).
 
 log(Log,#{myhandler_pid:=Pid} = Config) ->
-- 
cgit v1.2.3