Make some traces into a log, remove others

This commit is contained in:
Eugene Bujak
2018-11-28 13:21:39 +03:00
parent 70c5afd6a5
commit aa3f3e2c43
3 changed files with 9 additions and 3 deletions

View File

@@ -134,6 +134,13 @@ func parseParametersFromBody(r io.Reader) (map[string]string, error) {
// ---------------------
// debug logging helpers
// ---------------------
func _Func() string {
pc := make([]uintptr, 10) // at least 1 entry needed
runtime.Callers(2, pc)
f := runtime.FuncForPC(pc[0])
return path.Base(f.Name())
}
func trace(format string, args ...interface{}) {
pc := make([]uintptr, 10) // at least 1 entry needed
runtime.Callers(2, pc)