cmdlog

package
v0.0.0-...-b88c69b Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2024 License: ISC Imports: 10 Imported by: 1

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