From 8280b8b9a6e01f1b48ae2079f8d5114cd3b93592 Mon Sep 17 00:00:00 2001 From: Marcos Lilljedahl Date: Fri, 7 Aug 2015 18:29:20 -0300 Subject: [PATCH] Add comment to log function Signed-off-by: Marcos Lilljedahl --- entry.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/entry.go b/entry.go index 001c4c7..04673a0 100644 --- a/entry.go +++ b/entry.go @@ -70,6 +70,8 @@ func (entry *Entry) WithFields(fields Fields) *Entry { return &Entry{Logger: entry.Logger, Data: data} } +// This function is not declared with a pointer value because otherwise +// race conditions will occur when using multiple goroutines func (entry Entry) log(level Level, msg string) { entry.Time = time.Now() entry.Level = level