extlogs

package
v0.0.0-...-45409c3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 6, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

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

func WarnContext(context string, err error)

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)

func WarnError

func WarnError(err error)

WarnError prints an error as a warning, if the error is not nil. Example: WarnError(err) will print "[WARN] error: ..." if err != nil

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL