diff options
Diffstat (limited to 'internal/timeline/get.go')
-rw-r--r-- | internal/timeline/get.go | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/internal/timeline/get.go b/internal/timeline/get.go index a3cc8ef9b..cb6399ec9 100644 --- a/internal/timeline/get.go +++ b/internal/timeline/get.go @@ -24,20 +24,21 @@ import ( "errors" "fmt" - "github.com/sirupsen/logrus" + "codeberg.org/gruf/go-kv" + "github.com/superseriousbusiness/gotosocial/internal/log" ) const retries = 5 func (t *timeline) Get(ctx context.Context, amount int, maxID string, sinceID string, minID string, prepareNext bool) ([]Preparable, error) { - l := logrus.WithFields(logrus.Fields{ - "func": "Get", - "accountID": t.accountID, - "amount": amount, - "maxID": maxID, - "sinceID": sinceID, - "minID": minID, - }) + l := log.WithFields(kv.Fields{ + + {"accountID", t.accountID}, + {"amount", amount}, + {"maxID", maxID}, + {"sinceID", sinceID}, + {"minID", minID}, + }...) l.Debug("entering get") var items []Preparable @@ -136,12 +137,12 @@ func (t *timeline) GetXFromTop(ctx context.Context, amount int) ([]Preparable, e } func (t *timeline) GetXBehindID(ctx context.Context, amount int, behindID string, attempts *int) ([]Preparable, error) { - l := logrus.WithFields(logrus.Fields{ - "func": "GetXBehindID", - "amount": amount, - "behindID": behindID, - "attempts": *attempts, - }) + l := log.WithFields(kv.Fields{ + + {"amount", amount}, + {"behindID", behindID}, + {"attempts", attempts}, + }...) newAttempts := *attempts newAttempts++ |