From 69f65829796d90d9b6ce4c692e9f27fa70f6937c Mon Sep 17 00:00:00 2001 From: seun adekoya Date: Tue, 22 Feb 2022 09:11:47 -0600 Subject: [PATCH 1/3] modified the readme file for appropraite config settings --- README.md | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 02371f5..c27bd6b 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ syslogger ===== -A syslog backend for erlang logger. +A syslog backend for erlang logger.. This is a fork of the syslogger with update to the application configuration settings Usage ----- @@ -11,7 +11,7 @@ in your rebar.config like this: {deps, [ - { 'syslogger', "*", {git, "git://github.com/garazdawi/syslogger", {branch, "master"}}} + { 'syslogger', "*", {git, "https://github.com/sadekoya/syslogger.git", {branch, "master"}}} ] }. @@ -46,20 +46,16 @@ application variables, or by using the `logger:add_handler/2` API. For instance if you want to add two handlers that log to two different syslog facilities just add this to your sys.config. - {syslogger, - {ident, "myapp"}, - {log_opts, [cons, pid, perror]}, - {logger, [{handler, user_syslogger, syslogger, #{ facility => user }}, - {handler, local0_syslogger, syslogger, #{ facility => local0 }}] - } - }. - -This will add two syslogger instances to the Erlang logger that use different facilities. - -The same effect could have been achieved by using the logger API like this: + {syslogger, [ + {logger, [ + {handler, local0_syslogger, syslogger, + #{ + config => #{ facility => local0 }, + formatter => {logger_formatter, #{single_line => true}} + }}]}] + }. - logger:add_handler(user_syslogger, syslogger, #{ facility => user }), - logger:add_handler(local0_syslogger, syslogger, #{ facility => local0 }). +This will add two syslogger instances to the Erlang l Each syslogger handler can be configured using a map with these configuration options: From a149c755ad1ce93e4cd03d13fa6eaecff4810aa4 Mon Sep 17 00:00:00 2001 From: sadekoya <80714943+sadekoya@users.noreply.github.com> Date: Fri, 25 Feb 2022 10:06:08 -0600 Subject: [PATCH 2/3] updated syslog config settings for syslog facility --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c27bd6b..dd931dc 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ Configuration The syslogger application can be used either by configuring the handlers through application variables, or by using the `logger:add_handler/2` API. -For instance if you want to add two handlers that log to two different syslog +For instance if you want to add an handler that log to local0 syslog facilities just add this to your sys.config. {syslogger, [ @@ -55,7 +55,7 @@ facilities just add this to your sys.config. }}]}] }. -This will add two syslogger instances to the Erlang l +This will add a syslogger instances to the Erlang l Each syslogger handler can be configured using a map with these configuration options: From d2e0675d96c2607d061814159953bf0c4d484840 Mon Sep 17 00:00:00 2001 From: sadekoya <80714943+sadekoya@users.noreply.github.com> Date: Fri, 25 Feb 2022 10:13:32 -0600 Subject: [PATCH 3/3] Update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index dd931dc..120e528 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ syslogger ===== -A syslog backend for erlang logger.. This is a fork of the syslogger with update to the application configuration settings +A syslog backend for erlang logger. Usage ----- @@ -11,7 +11,7 @@ in your rebar.config like this: {deps, [ - { 'syslogger', "*", {git, "https://github.com/sadekoya/syslogger.git", {branch, "master"}}} + { 'syslogger', "*", {git, "git://github.com/garazdawi/syslogger", {branch, "master"}}} ] }. @@ -55,7 +55,7 @@ facilities just add this to your sys.config. }}]}] }. -This will add a syslogger instances to the Erlang l +This will add a syslogger instance to the Erlang Each syslogger handler can be configured using a map with these configuration options: