aboutsummaryrefslogtreecommitdiff
path: root/log.go
diff options
context:
space:
mode:
Diffstat (limited to 'log.go')
-rw-r--r--log.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/log.go b/log.go
index 84587dc..3afcbcd 100644
--- a/log.go
+++ b/log.go
@@ -65,6 +65,9 @@ func (l logger) Log(lvl Level, args ...interface{}) {
l.lock.Lock()
defer l.lock.Unlock()
+ // Place fields at the end
+ args = append(args, l.fields...)
+
msg := Message{
Name: l.name,
Time: ts.Format(l.timeFormat),
@@ -72,6 +75,7 @@ func (l logger) Log(lvl Level, args ...interface{}) {
Fields: make([]interface{}, 0),
}
+ // Allow for map arguments
for _, f := range args {
switch c := f.(type) {
case map[string]string: