log

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

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

Go to latest
Published: May 11, 2023 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Overview

Package log is a zero-dependency colorful, levelled logger.

Index

Constants

View Source
const (
	LevelError = iota
	LevelWarn
	LevelInfo
	LevelDebug
	LevelTrace
)

Variables

This section is empty.

Functions

func Debugf

func Debugf(format string, args ...any)

func Error

func Error(e error)

func Errorf

func Errorf(format string, args ...any)

func Fatal

func Fatal(e error)

func Fatalf

func Fatalf(format string, args ...any)

Fatalf logs the error and exits with code 1

func Infof

func Infof(format string, args ...any)

func SetLevel

func SetLevel(level int)

LevelError = 0 LevelWarn = 1 LevelInfo = 2 LevelDebug = 3 LevelTrace = 4

func SetOutput

func SetOutput(w io.Writer)

func SetTimeFormat

func SetTimeFormat(format string)

func Tracef

func Tracef(format string, args ...any)

func Warnf

func Warnf(format string, args ...any)

Types

This section is empty.

Jump to

Keyboard shortcuts

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