From 5bfbc73bbc47702c6ae37473fa1b5d88ae255807 Mon Sep 17 00:00:00 2001 From: facundo Date: Sat, 27 Jul 2024 18:40:55 -0300 Subject: [PATCH 1/3] handle environment configuration in main --- accesslog.go | 17 +---------------- db.go | 8 ++------ main.go | 29 ++++++++++++++++++++++++----- 3 files changed, 27 insertions(+), 27 deletions(-) diff --git a/accesslog.go b/accesslog.go index ec0ee9e..cd6b75e 100644 --- a/accesslog.go +++ b/accesslog.go @@ -15,10 +15,6 @@ import ( "time" ) -// defaulting to the default Debian location (and presumably other linuxes) -// overridable with NGTOP_LOGS_PATH env var -const DEFAULT_PATH = "/var/log/nginx/access.log*" - // 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