Skip to content

Commit

Permalink
add DebugJSON utility logging function
Browse files Browse the repository at this point in the history
  • Loading branch information
Larry Hitchon committed Jul 26, 2018
1 parent 599175e commit 9a5ee0a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions assertion/log.go
Expand Up @@ -18,3 +18,12 @@ func Debugf(format string, args ...interface{}) {
}
fmt.Printf(format, args...)
}

func DebugJSON(title string, object interface{}) {
if isDebug == false {
return
}
s, _ := JSONStringify(object)
fmt.Println(title)
fmt.Println(s)
}

0 comments on commit 9a5ee0a

Please sign in to comment.