stdlog

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Debug color: purple
	Debug  = outputLine
	DebugF = outputFormatLine
	DebugW = outputKeyValueLine

	// Info color: green
	Info  = outputLine
	InfoF = outputFormatLine
	InfoW = outputKeyValueLine

	// Warn color: yellow
	Warn  = outputLine
	WarnF = outputFormatLine
	WarnW = outputKeyValueLine

	// Error color: red
	Error  = outputLine
	ErrorF = outputFormatLine
	ErrorW = outputKeyValueLine

	// Fatal color: red
	Fatal  = log.Fatalln
	FatalF = func(format string, v ...any) {
		log.Fatalf(formatLine(format), v...)
	}
	FatalW = func(msg string, kv ...any) {
		log.Print(msg)
		log.Fatalln(kv...)
	}

	// Panic color: red
	Panic  = log.Panicln
	PanicF = func(format string, v ...any) {
		log.Panicf(formatLine(format), v...)
	}
	PanicW = func(msg string, kv ...any) {
		log.Print(msg)
		log.Panicln(kv...)
	}
)

suggestion: W stand for with key value

Functions

func Stream added in v1.1.3

func Stream() jsonmessage.Stream

Types

This section is empty.

Jump to

Keyboard shortcuts

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