Last active
January 15, 2016 10:36
-
-
Save rishiloyola/cc8dc65af316a6b21e5b 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
if err != nil { | |
pc, fn, line, _ := runtime.Caller(1) | |
message := fmt.Sprintf("[error] %s[%s:%d] %s", runtime.FuncForPC(pc).Name(), fn, line, err.Error()) | |
log.Println(message) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment