xlog

package
v0.0.0-...-6c569f3 Latest Latest
Warning

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

Go to latest
Published: May 16, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package xlog is a user-defined log, include multi-level highlight support, output redirection support

Index

Constants

View Source
const (
	Disabled = iota
	FatalLevel
	ErrorLevel
	InfoLevel
	DebugLevel
)

log levels

Variables

View Source
var (
	Warn   = warnlLog.Print
	Warnln = warnlLog.Println
	Warnf  = warnlLog.Printf

	Println = debugLog.Println
	Print   = debugLog.Print
	Printf  = debugLog.Printf

	Errorln = errorLog.Println
	Error   = errorLog.Print
	Errorf  = errorLog.Printf

	Infoln = infoLog.Println
	Infof  = infoLog.Printf
	Info   = infoLog.Print

	Fatalln = fatalLog.Fatalln
	Fatalf  = fatalLog.Fatalf
	Fatal   = fatalLog.Fatal
)

log alias

Functions

func SetLevel

func SetLevel(level int, w io.Writer)

SetLevel controls log level, the higher the level is, the colorful the output becomes from fatal->error->info->debug

Types

This section is empty.

Jump to

Keyboard shortcuts

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