loghelper

package
v1.11.6 Latest Latest
Warning

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

Go to latest
Published: May 27, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const Error = "error"

Variables

View Source
var InertDisplayer inertDisplayer //nolint

Functions

func BuildDisplayFunc added in v1.1.1

func BuildDisplayFunc(writer io.Writer, usedColor *color.Color) func(string)

func Concat added in v1.1.1

func Concat(parts ...string) string

func LevelWarnOrDebug

func LevelWarnOrDebug(debug bool) hclog.Level

func StdDisplay added in v1.1.1

func StdDisplay(msg string)

Types

type BasicDisplayer added in v1.1.1

type BasicDisplayer struct {
	// contains filtered or unexported fields
}

func MakeBasicDisplayer added in v1.1.1

func MakeBasicDisplayer(logger hclog.Logger, display func(string)) BasicDisplayer

func (BasicDisplayer) Display added in v1.1.1

func (bd BasicDisplayer) Display(msg string)

func (BasicDisplayer) Flush added in v1.1.1

func (bd BasicDisplayer) Flush(bool)

func (BasicDisplayer) IsDebug added in v1.1.1

func (bd BasicDisplayer) IsDebug() bool

func (BasicDisplayer) Log added in v1.1.1

func (bd BasicDisplayer) Log(level hclog.Level, msg string, args ...any)

type Displayer added in v1.1.1

type Displayer interface {
	Display(msg string)
	IsDebug() bool
	Log(level hclog.Level, msg string, args ...any)
	Flush(logMode bool)
}

type StateWrapper added in v1.1.1

type StateWrapper struct {
	Displayer
}

func NewRecordingDisplayer added in v1.1.1

func NewRecordingDisplayer(displayer Displayer) *StateWrapper

func (*StateWrapper) Flush added in v1.1.1

func (sw *StateWrapper) Flush(logMode bool)

Jump to

Keyboard shortcuts

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