logging

package
v0.0.0-...-09edcb8 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LogCollector

type LogCollector interface {
	fmt.Stringer
	Logger
}

func NewTestLogger

func NewTestLogger() LogCollector

type LogTree

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

func NewLogTree

func NewLogTree(name string) *LogTree

func (*LogTree) Embed

func (c *LogTree) Embed(logs *LogTree)

func (*LogTree) Fork

func (c *LogTree) Fork(message string) *LogTree

func (*LogTree) IsVerbose

func (c *LogTree) IsVerbose() bool

func (*LogTree) Log

func (c *LogTree) Log(message ...any)

func (*LogTree) Logf

func (c *LogTree) Logf(format string, args ...any)

func (*LogTree) SetVerbose

func (c *LogTree) SetVerbose(verbose bool)

func (*LogTree) String

func (c *LogTree) String() string

func (*LogTree) Verbose

func (c *LogTree) Verbose() Logger

func (*LogTree) Write

func (c *LogTree) Write(msg string)

type Logger

type Logger interface {
	// Log prints a line to the output writer with a header.
	Log(msg ...any)
	// Logf prints a formatted line to the output writer with a header.
	Logf(format string, args ...any)
	// Write prints the msg string to the output with no additional formatting, followed by a newline
	Write(msg string)
	// Verbose returns the logger instance if verbose logging is enabled, and otherwise returns nil.
	// A nil logger created with `logging.NewLogger` is safe to call methods on.
	Verbose() Logger
	// IsVerbose returns true if verbose logging is enabled, and false otherwise.
	IsVerbose() bool
	// SetVerbose sets the verbose logging flag.
	SetVerbose(verbose bool)
}

func NewLogger

func NewLogger(output io.Writer) Logger

Jump to

Keyboard shortcuts

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