io

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2024 License: Apache-2.0 Imports: 9 Imported by: 4

Documentation

Index

Constants

View Source
const (
	MaxArchiveSize = 50
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

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

func NewLogger

func NewLogger(style styles.Theme, archiveDir string) *Logger

func (*Logger) AsPlainText

func (l *Logger) AsPlainText(exec func())

func (*Logger) Close

func (l *Logger) Close() error

func (*Logger) Debugf

func (l *Logger) Debugf(msg string, args ...any)

func (*Logger) Debugx

func (l *Logger) Debugx(msg string, kv ...any)

func (*Logger) Error

func (l *Logger) Error(err error, msg string)

func (*Logger) Errorf

func (l *Logger) Errorf(msg string, args ...any)

func (*Logger) Errorx

func (l *Logger) Errorx(msg string, kv ...any)

func (*Logger) FatalErr

func (l *Logger) FatalErr(err error)

func (*Logger) Fatalf

func (l *Logger) Fatalf(msg string, args ...any)

func (*Logger) Fatalx

func (l *Logger) Fatalx(msg string, kv ...any)

func (*Logger) Infof

func (l *Logger) Infof(msg string, args ...any)

func (*Logger) Infox

func (l *Logger) Infox(msg string, kv ...any)

func (*Logger) PlainTextInfo

func (l *Logger) PlainTextInfo(msg string)

func (*Logger) PlainTextSuccess

func (l *Logger) PlainTextSuccess(msg string)

func (*Logger) Println

func (l *Logger) Println(data string)

func (*Logger) SetLevel

func (l *Logger) SetLevel(level int)

SetLevel sets the log level for the logger. -1 = Fatal 0 = Info 1 = Debug Default is Info.

func (*Logger) Warnf

func (l *Logger) Warnf(msg string, args ...any)

func (*Logger) Warnx

func (l *Logger) Warnx(msg string, kv ...any)

type StdErrWriter

type StdErrWriter struct {
	LogFields   []any
	Logger      *Logger
	AsPlainText bool
}

func (StdErrWriter) Write

func (w StdErrWriter) Write(p []byte) (n int, err error)

type StdInReader

type StdInReader struct{}

func (StdInReader) Read

func (r StdInReader) Read(p []byte) (n int, err error)

type StdOutWriter

type StdOutWriter struct {
	LogFields   []any
	Logger      *Logger
	AsPlainText bool
}

func (StdOutWriter) Write

func (w StdOutWriter) Write(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

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