@@ -307,36 +307,6 @@ configure_syslog_error_logger() ->
307
307
_ -> ok
308
308
end .
309
309
310
- - define (SYSLOG_LOCAL_IP , {ip ,{127 ,0 ,0 ,1 }}).
311
- configure_syslog () ->
312
- ok = app_utils :load_applications ([syslog ]),
313
- % % https://github.com/schlagert/syslog#configuration
314
- Protocol = case application :get_env (syslog , protocol ) of
315
- undefined ->
316
- {rfc3164 , udp , [? SYSLOG_LOCAL_IP ]};
317
- % % {protocol,
318
- % % rfc3164 |
319
- % % rfc5424 |
320
- % % {rfc3164 | rfc5424, tcp | udp} |
321
- % % {rfc3164 | rfc5424, udp, [gen_udp:option()]} |
322
- % % {rfc3164 | rfc5424, tcp, [gen_tcp:option()]} |
323
- % % {rfc5424, tls, [ssl:connect_option()]}
324
- % % }
325
- {ok , Rfc } when Rfc =:= rfc3164 ; Rfc =:= rfc5424 ->
326
- {Rfc , udp , [? SYSLOG_LOCAL_IP ]};
327
- {ok , {Rfc , Transport }} when Rfc =:= rfc3164 ; Rfc =:= rfc5424 ->
328
- {Rfc , Transport , [? SYSLOG_LOCAL_IP ]};
329
- {ok , {Rfc , Transport , Opts }} when Rfc =:= rfc3164 ; Rfc =:= rfc5424 ->
330
- case proplists :lookup (ip , Opts ) of
331
- none ->
332
- {Rfc , Transport , [? SYSLOG_LOCAL_IP |Opts ]};
333
- _ ->
334
- {Rfc , Transport , Opts }
335
- end
336
- end ,
337
- ok = application :unset_env (syslog , protocol ),
338
- ok = application :set_env (syslog , protocol , Protocol ).
339
-
340
310
remove_rabbit_handlers (Handlers , FormerHandlers ) ->
341
311
lists :filter (fun (Handler ) ->
342
312
not lists :member (Handler , FormerHandlers )
@@ -380,7 +350,7 @@ lager_backend(exchange) -> lager_exchange_backend.
380
350
generate_handler (syslog_lager_backend , HandlerConfig ) ->
381
351
DefaultConfigVal = default_config_value (level ),
382
352
Level = proplists :get_value (level , HandlerConfig , DefaultConfigVal ),
383
- ok = configure_syslog ( ),
353
+ ok = app_utils : load_applications ([ syslog ] ),
384
354
[{syslog_lager_backend ,
385
355
[Level ,
386
356
{},
0 commit comments