logger

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2024 License: Apache-2.0 Imports: 4 Imported by: 5

Documentation

Overview

package logger inplements a logging function for use within the test framework and can be used within test cases.

The output of the log lines can be controlled with LogWriter

Example using Ginkgo

import "github.com/giantswarm/clustertest/pkg/logger"

func TestExample() {
	logger.LogWriter = GinkgoWriter

	logger.Log("This will now output to the Ginkgo log output")
}

Index

Constants

This section is empty.

Variables

View Source
var (
	// LogWriter is the io.Writer that log lines will be written too
	LogWriter io.Writer = os.Stdout
	// DisableLogging will disable all logging from the test framework
	DisableLogging bool = false
)

Functions

func Log

func Log(str string, args ...any)

Log writes out the provided message to the LogWriter

Types

This section is empty.

Jump to

Keyboard shortcuts

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