summaryrefslogtreecommitdiffhomepage
path: root/helpers
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2017-03-18 17:31:42 +0100
committerBjørn Erik Pedersen <[email protected]>2017-03-18 17:34:49 +0100
commit4382a8a6a030520d9f094b3d7bb8f3ae3f08b187 (patch)
tree36aa0a9c133d104983ff2237e5d51189310124d1 /helpers
parent9dfb9c14454e6184cd7ff52f6b9f1beffbadf1e5 (diff)
downloadhugo-4382a8a6a030520d9f094b3d7bb8f3ae3f08b187.tar.gz
hugo-4382a8a6a030520d9f094b3d7bb8f3ae3f08b187.zip
helpers: Add a Debug method to DistinctLogger
Diffstat (limited to 'helpers')
-rw-r--r--helpers/general.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/helpers/general.go b/helpers/general.go
index f9e67e72d..e6435179c 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{}) {