From 083099a9575f8b2fac22c1d4a51a9dd0e2201243 Mon Sep 17 00:00:00 2001 From: "R. Aidan Campbell" Date: Mon, 11 Oct 2021 05:37:33 -0700 Subject: reference global logrus (#274) * reference logrus' global logger instead of passing and storing a logger reference everywhere * always directly use global logrus logger instead of referencing an instance * test suites should also directly use the global logrus logger * rename gin logging function to clarify that it's middleware * correct comments which erroneously referenced removed logger parameter * setting log level for tests now uses logrus' exported type instead of the string value, to guarantee error isn't possible --- internal/timeline/index.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'internal/timeline/index.go') diff --git a/internal/timeline/index.go b/internal/timeline/index.go index 7d7dc8873..5cd60b16b 100644 --- a/internal/timeline/index.go +++ b/internal/timeline/index.go @@ -81,7 +81,7 @@ grabloop: } func (t *timeline) IndexBehind(ctx context.Context, statusID string, include bool, amount int) error { - l := t.log.WithFields(logrus.Fields{ + l := logrus.WithFields(logrus.Fields{ "func": "IndexBehind", "include": include, "amount": amount, -- cgit v1.2.3