Commit e7c3cb22 authored by Tim Hockin's avatar Tim Hockin

Logf() failures for nicer logs

parent ca30f386
......@@ -252,16 +252,24 @@ func nowStamp() string {
return time.Now().Format(time.StampMilli)
}
func Logf(format string, a ...interface{}) {
fmt.Fprintf(GinkgoWriter, nowStamp()+": INFO: "+format+"\n", a...)
func logf(level string, format string, args ...interface{}) {
fmt.Fprintf(GinkgoWriter, nowStamp()+": "+level+": "+format+"\n", args...)
}
func Failf(format string, a ...interface{}) {
Fail(nowStamp()+": "+fmt.Sprintf(format, a...), 1)
func Logf(format string, args ...interface{}) {
logf("INFO", format, args...)
}
func Failf(format string, args ...interface{}) {
msg := fmt.Sprintf(format, args...)
logf("FAIL", msg)
Fail(nowStamp()+": "+msg, 1)
}
func Skipf(format string, args ...interface{}) {
Skip(nowStamp() + ": " + fmt.Sprintf(format, args...))
msg := fmt.Sprintf(format, args...)
logf("SKIP", msg)
Skip(nowStamp() + ": " + msg)
}
func SkipUnlessNodeCountIsAtLeast(minNodeCount int) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment