log

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package log writes diagnostics to stderr, separate from report data.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ColorEnabled added in v0.8.0

func ColorEnabled(writer io.Writer) bool

ColorEnabled respects explicit configuration and common terminal conventions.

func Errorf

func Errorf(format string, args ...any)

Errorf always writes an error, including in quiet mode and redirected output.

func Errorln

func Errorln(message any)

Errorln always writes an error line.

func Infof

func Infof(format string, args ...any)

Infof displays interactive progress unless quiet mode is enabled.

func Infoln

func Infoln(message any)

Infoln displays one interactive informational line.

func Init

func Init(stderr io.Writer)

Init sets the stderr destination for progress and diagnostic messages.

func IsTerminal added in v0.8.0

func IsTerminal(writer io.Writer) bool

IsTerminal reports whether a writer is connected to a terminal.

func Reset

func Reset()

Reset removes the diagnostics destination, primarily for tests.

Types

type FileProgress added in v0.8.0

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

FileProgress renders a terminal-only progress bar based on completed source files.

func NewFileProgress added in v0.8.0

func NewFileProgress(total int) *FileProgress

NewFileProgress reports progress based on each completed file's proportional share of the total. Terminals get a 100-character bar; other writers get concise checkpoints to avoid flooding captured output.

func (*FileProgress) Complete added in v0.8.0

func (p *FileProgress) Complete()

Complete marks one source file complete and emits progress when the display reaches its next percentage point or captured-output checkpoint.

func (*FileProgress) Finish added in v0.8.0

func (p *FileProgress) Finish()

Finish finalizes the progress display, ending an interactive bar line.

Jump to

Keyboard shortcuts

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