From: Bjørn Erik Pedersen Date: Sat, 18 Mar 2017 16:31:42 +0000 (+0100) Subject: helpers: Add a Debug method to DistinctLogger X-Git-Tag: v0.20~130 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=4382a8a6a030520d9f094b3d7bb8f3ae3f08b187;p=brevno-suite%2Fhugo helpers: Add a Debug method to DistinctLogger --- diff --git a/helpers/general.go b/helpers/general.go index f9e67e72..e6435179 100644 --- a/helpers/general.go +++ b/helpers/general.go @@ -213,6 +213,13 @@ type DistinctLogger struct { m map[string]bool } +// Debug prints all the log entries to standard output. +func (l *DistinctLogger) Debug() { + for k, _ := range l.m { + fmt.Println(k) + } +} + // Println will log the string returned from fmt.Sprintln given the arguments, // but not if it has been logged before. func (l *DistinctLogger) Println(v ...interface{}) {