log

package
v0.0.0-...-9b6ed7f Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Trace bool

Functions

func Debug

func Debug(a ...interface{})

func Debugf

func Debugf(format string, a ...interface{})

Debug logger

func Debugln

func Debugln(a ...interface{})

func Error

func Error(a ...interface{})

func Errorf

func Errorf(format string, a ...interface{})

Error logger

func Errorln

func Errorln(a ...interface{})

func Info

func Info(a ...interface{})

func Infof

func Infof(format string, a ...interface{})

Info logger

func Infoln

func Infoln(a ...interface{})

func IsNormal

func IsNormal() bool

func IsQuiet

func IsQuiet() bool

func IsVerbose

func IsVerbose() bool

func Middleware

func Middleware(dryRun bool, dryrunContent string) option.Middleware

func NewStringReadCloser

func NewStringReadCloser(s string) io.ReadCloser

func Print

func Print(a ...interface{})

func Printf

func Printf(format string, a ...interface{})

Printer for standard output

func Println

func Println(a ...interface{})

func Prompt

func Prompt(a ...interface{})

func Promptf

func Promptf(format string, a ...interface{})

prompter

func Promptln

func Promptln(a ...interface{})

func SetLogLevel

func SetLogLevel(level Level)

func SetLogOutput

func SetLogOutput(w io.Writer)

Types

type FileWriter

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

func NewFileWriter

func NewFileWriter(pathname string) (*FileWriter, error)

func (*FileWriter) Close

func (cw *FileWriter) Close() error

func (*FileWriter) Write

func (cw *FileWriter) Write(p []byte) (n int, err error)

type Level

type Level int
const (
	Quiet Level = iota
	Normal
	Verbose
)

type Printer

type Printer interface {
	Printf(string, ...interface{})
	Print(...interface{})
	Println(...interface{})

	SetEnabled(bool)
	IsEnabled() bool

	SetLogger(io.Writer)
}

func NewPrinter

func NewPrinter(w io.Writer, max int) Printer

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳