From dbb65f564f89dae06aa854bb5859804cb6d1e99d Mon Sep 17 00:00:00 2001 From: facundo Date: Sun, 28 Jul 2024 12:25:40 -0300 Subject: [PATCH 01/20] get log format from environment --- accesslog.go | 13 ++++++------- main.go | 14 +++++++++++--- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/accesslog.go b/accesslog.go index cd6b75e..4c29f75 100644 --- a/accesslog.go +++ b/accesslog.go @@ -15,15 +15,14 @@ import ( "time" ) -// TODO add support to nginx config syntax, eg "$remote_addr - $remote_user [$time_local] ..." and add code to translate it to these regexes -// FIXME consolidate field list (duplicated knowledge) -const LOG_COMBINED_PATTERN = `(?P\S+) - (?P\S+) \[(?P