log

package
v2.0.0-alpha.27 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2025 License: MIT Imports: 5 Imported by: 158

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

type Logger interface {
	Infof(format string, v ...interface{})
	Warnf(format string, v ...interface{})
	Printf(format string, v ...interface{})
	Donef(format string, v ...interface{})
	Debugf(format string, v ...interface{})
	Errorf(format string, v ...interface{})
	TInfof(format string, v ...interface{})
	TWarnf(format string, v ...interface{})
	TPrintf(format string, v ...interface{})
	TDonef(format string, v ...interface{})
	TDebugf(format string, v ...interface{})
	TErrorf(format string, v ...interface{})
	Println()
	EnableDebugLog(enable bool)
}

Logger ...

func NewLogger

func NewLogger(options ...LoggerOptions) Logger

NewLogger ...

type LoggerOptions

type LoggerOptions func(*logger)

LoggerOptions ...

func WithDebugLog

func WithDebugLog(enable bool) LoggerOptions

WithDebugLog ...

func WithOutput

func WithOutput(w io.Writer) LoggerOptions

WithOutput ...

func WithPrefix

func WithPrefix(prefix string) LoggerOptions

WithPrefix adds a prefix to each log line. Prefix is added before the timestamp if timestamps are enabled. It does not add any extra spaces, so if you want a space after the prefix, include it in the prefix string.

func WithTimestampLayout

func WithTimestampLayout(layout string) LoggerOptions

WithTimestampLayout ...

type Severity

type Severity uint8

Severity ...

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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