You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ko...@apache.org on 2021/04/22 20:46:09 UTC

[couchdb] 03/03: Add a temporary logger config

This is an automated email from the ASF dual-hosted git repository.

kocolosk pushed a commit to branch new-logger
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit 0a6200d86c18560f05cb07c9fb65b096a802a7d3
Author: Adam Kocoloski <ko...@apache.org>
AuthorDate: Thu Apr 22 20:45:20 2021 +0000

    Add a temporary logger config
---
 rel/files/sys.config | 30 +++++++++++++++++++++++++++++-
 1 file changed, 29 insertions(+), 1 deletion(-)

diff --git a/rel/files/sys.config b/rel/files/sys.config
index 97562f5..7ea70b5 100644
--- a/rel/files/sys.config
+++ b/rel/files/sys.config
@@ -10,4 +10,32 @@
 % License for the specific language governing permissions and limitations under
 % the License.
 
-[].
+[
+    {kernel, [
+        {logger, [
+            {handler, access, logger_std_h,
+                #{
+                    config => #{
+                        file => "dev/logs/access.log"
+                    },
+                    filters => [
+                        {access_logs, {fun logger_filters:domain/2, {log, equal, [chttpd_access_log]}}}
+                    ],
+                    filter_default => stop,
+                    formatter => {logger_formatter, #{}}
+                }
+            },
+            {handler, debug, logger_std_h,
+                #{
+                    config => #{
+                        file => "dev/logs/debug.log"
+                    },
+                    filters => [
+                        % comment this filter out to include access logs in the debug log as well
+                        {access_logs, {fun logger_filters:domain/2, {stop, equal, [chttpd_access_log]}}}
+                    ]
+                }
+            }
+        ]}
+       ]}
+].