Created
October 20, 2015 16:46
-
-
Save evanphx/dd794c6b06b34839bcf2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package log | |
import "github.com/Sirupsen/logrus" | |
func InfoK(str string, args ...interface{}) { | |
f := logrus.Fields{} | |
for i := 0; i < len(args); i += 2 { | |
f[args[i].(string)] = args[i+1] | |
} | |
logrus.WithFields(f).Infoln(str) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment