log

package
v4.2.1 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2022 License: MIT Imports: 5 Imported by: 21

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddWriter

func AddWriter(writer io.Writer)

func Debug

func Debug(args ...any)

func Debugf

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

func DeleteWriter

func DeleteWriter(writer io.Writer)

func Error

func Error(args ...any)

func Errorf

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

Errorf logs a message at level Error on the standard logger.

func Fatalf

func Fatalf(format string, args ...interface{})

Fatalf logs a message at level Fatal on the standard logger then the process will exit with status set to 1.

func Info

func Info(args ...any)

func Infof

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

Infof logs a message at level Info on the standard logger.

func Panicf

func Panicf(format string, args ...interface{})

Panicf logs a message at level Panic on the standard logger.

func Warn

func Warn(args ...any)

func Warnf

func Warnf(format string, args ...interface{})

Warnf logs a message at level Warn on the standard logger.

func With

func With(fields ...zap.Field) *zap.Logger

Types

type MultipleWriter

type MultipleWriter []io.Writer

var colorableStdout = colorable.NewColorableStdout()

func (*MultipleWriter) Add

func (m *MultipleWriter) Add(writer io.Writer)

func (*MultipleWriter) Delete

func (m *MultipleWriter) Delete(writer io.Writer)

func (*MultipleWriter) Write

func (m *MultipleWriter) Write(p []byte) (n int, err error)

type Zap

type Zap interface {
	With(fields ...zap.Field) *zap.Logger
	Debug(msg string, fields ...zap.Field)
	Info(msg string, fields ...zap.Field)
	Warn(msg string, fields ...zap.Field)
	Error(msg string, fields ...zap.Field)
}

Jump to

Keyboard shortcuts

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