cmdlog

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2026 License: ISC Imports: 10 Imported by: 2 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package cmdlog implements color leveled logging for command line tools.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

type Logger struct {
	NoLevel *log.Logger
	Debug   *log.Logger
	Success *log.Logger
	Info    *log.Logger
	Warn    *log.Logger
	Error   *log.Logger
	// contains filtered or unexported fields
}

func New

func New(env *xos.Env, w io.Writer) *Logger

func NewTB

func NewTB(env *xos.Env, tb testing.TB) *Logger

func (*Logger) GetDebug

func (l *Logger) GetDebug() bool

func (*Logger) GetTS

func (l *Logger) GetTS() bool

func (*Logger) GetTSFormat

func (l *Logger) GetTSFormat() string

func (*Logger) SetDebug

func (l *Logger) SetDebug(enabled bool)

func (*Logger) SetTS

func (l *Logger) SetTS(enabled bool)

func (*Logger) SetTSFormat

func (l *Logger) SetTSFormat(tsfmt string)

func (*Logger) WithCCPrefix

func (l *Logger) WithCCPrefix(s string) *Logger

func (*Logger) WithPrefix

func (l *Logger) WithPrefix(caps, s string) *Logger

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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