Documentation
¶
Overview ¶
Package extlogs provides helper functions for printing warnings during Ginkgo test runs.
Why we use GinkgoWriter: ------------------------- In Ginkgo, using fmt.Println() or log.Print() may not show messages. That's why we use fmt.Fprintf(ginkgo.GinkgoWriter, ...) instead of fmt.Println().
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Info ¶
func Info(msg string)
Info prints an informational message to the Ginkgo output. Example: Info("starting test suite")
func Infof ¶
func Infof(format string, args ...interface{})
Infof prints a formatted informational message (like fmt.Printf). Example: Infof("using config: %s", path)
func Warn ¶
func Warn(msg string)
Warn prints a simple warning message to the Ginkgo output. Example: Warn("something might be wrong")
func WarnContext ¶
WarnContext prints a warning with context + error, if the error is not nil. Example: WarnContext("failed to load config", err)
func WarnContextf ¶
func WarnContextf(format string, args ...interface{})
WarnContextf prints a formatted warning message with context. This is like printf + context-aware logging. Example: WarnContextf("unexpected value: %d", value)
Types ¶
This section is empty.