gxlog

package
v1.14.0 Latest Latest
Warning

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

Go to latest
Published: May 21, 2023 License: Apache-2.0 Imports: 8 Imported by: 80

Documentation

Overview

package gxlog is based on log4go. color.go provides colorful terminal log output functions.

package gxlog is based on log4go. pretty.go provides pretty format string

Index

Constants

This section is empty.

Variables

View Source
var (
	// Normal colors
	// NORMAL   = []byte{'\033', '0', 'm'}
	NORMAL   = []byte{'\033', '0'}
	NBlack   = []byte{'\033', '[', '3', '0', 'm'}
	NRed     = []byte{'\033', '[', '3', '1', 'm'}
	NGreen   = []byte{'\033', '[', '3', '2', 'm'}
	NYellow  = []byte{'\033', '[', '3', '3', 'm'}
	NBlue    = []byte{'\033', '[', '3', '4', 'm'}
	NMagenta = []byte{'\033', '[', '3', '5', 'm'}
	NCyan    = []byte{'\033', '[', '3', '6', 'm'}
	NWhite   = []byte{'\033', '[', '3', '7', 'm'}
	// Bright colors
	BBlack                    = []byte{'\033', '[', '3', '0', ';', '1', 'm'}
	BRed                      = []byte{'\033', '[', '3', '1', ';', '1', 'm'}
	BGreen                    = []byte{'\033', '[', '3', '2', ';', '1', 'm'}
	BYellow                   = []byte{'\033', '[', '3', '3', ';', '1', 'm'}
	BBlue                     = []byte{'\033', '[', '3', '4', ';', '1', 'm'}
	BMagenta                  = []byte{'\033', '[', '3', '5', ';', '1', 'm'}
	BCyan                     = []byte{'\033', '[', '3', '6', ';', '1', 'm'}
	BWhite                    = []byte{'\033', '[', '3', '7', ';', '1', 'm'}
	UnderlineTwinkleHighLight = []byte{'\033', '[', '1', ';', '6', ';', '4', '0', 'm'}
)

Functions

func CDebug

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

func CEPrintf

func CEPrintf(color []byte, format string, args ...interface{})

func CEPrintfln

func CEPrintfln(color []byte, format string, args ...interface{})

func CError

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

func CFatal

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

func CInfo

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

func CPrintf

func CPrintf(color []byte, format string, args ...interface{})

func CPrintfln

func CPrintfln(color []byte, format string, args ...interface{})

func CWarn

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

func ColorPrint

func ColorPrint(i interface{})

func ColorPrintf

func ColorPrintf(fmt string, args ...interface{})

func ColorPrintln

func ColorPrintln(i interface{})

func ColorSprint

func ColorSprint(i interface{}) string

func ColorSprintf

func ColorSprintf(fmt string, args ...interface{}) string

func ColorSprintln

func ColorSprintln(i interface{}) string

func PrettyString

func PrettyString(i interface{}) string

Types

type Logger added in v1.11.16

type Logger interface {
	Info(args ...interface{})
	Warn(args ...interface{})
	Error(args ...interface{})
	Debug(args ...interface{})

	Infof(fmt string, args ...interface{})
	Warnf(fmt string, args ...interface{})
	Errorf(fmt string, args ...interface{})
	Debugf(fmt string, args ...interface{})
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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