From 632f05c9ea04f97ef78df386713a252cb6a187c9 Mon Sep 17 00:00:00 2001 From: simon987 Date: Sat, 6 Feb 2021 15:14:03 -0500 Subject: [PATCH] Fix docker build, tweaks logger --- Dockerfile | 2 +- influxdb.go | 2 +- main.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7774902..51e0133 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,7 @@ FROM golang:1.15 as go_build WORKDIR /build/ -COPY main.go . +COPY *.go ./ COPY go.mod . RUN GOOS=linux CGO_ENABLED=0 go build -a -installsuffix cgo -o feed_archiver . RUN strip feed_archiver diff --git a/influxdb.go b/influxdb.go index ba29416..3dd16a2 100644 --- a/influxdb.go +++ b/influxdb.go @@ -58,7 +58,7 @@ func (m *Monitoring) flushQueue(bp *influx.BatchPoints) { logrus.WithFields(logrus.Fields{ "size": len((*bp).Points()), - }).Debug("Wrote points") + }).Info("Wrote points") *bp, _ = influx.NewBatchPoints(influx.BatchPointsConfig{ Database: m.database, diff --git a/main.go b/main.go index b6d0aea..8379931 100644 --- a/main.go +++ b/main.go @@ -117,7 +117,7 @@ func main() { archiverCtx.tables = map[string]bool{} - logrus.SetLevel(logrus.DebugLevel) + logrus.SetLevel(logrus.InfoLevel) connPoolConfig := pgx.ConnPoolConfig{ ConnConfig: pgx.ConnConfig{