sglog

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2019 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TextBlack = iota + 30
	TextRed
	TextGreen
	TextYellow
	TextBlue
	TextMagenta
	TextCyan
	TextWhite
)

Variables

This section is empty.

Functions

func Black

func Black(str string) string

func Blue

func Blue(str string) string

func CloseGlobalLogger

func CloseGlobalLogger()

func Cyan

func Cyan(str string) string

func Debug

func Debug(format string, a ...interface{})

func Error

func Error(format string, a ...interface{})

func Fatal

func Fatal(format string, a ...interface{})

func Green

func Green(str string) string

func Info

func Info(format string, a ...interface{})

func IsWindows

func IsWindows() bool

func LoopLogServer

func LoopLogServer()

func Magenta

func Magenta(str string) string

func Red

func Red(str string) string

func Swap

func Swap(logger *Logger)

func White

func White(str string) string

func Yellow

func Yellow(str string) string

Types

type LogData

type LogData struct {
	// contains filtered or unexported fields
}

func NewLogData

func NewLogData(lv int, format string, a ...interface{}) *LogData

type Logger

type Logger struct {
	// contains filtered or unexported fields
}

func NewLogger

func NewLogger(strLevel string, pathname string, flag int, isConsole bool) (*Logger, error)

func (*Logger) AddData

func (logger *Logger) AddData(logData *LogData)

func (*Logger) Close

func (logger *Logger) Close()

func (*Logger) InitChan

func (logger *Logger) InitChan()

func (*Logger) Write

func (logger *Logger) Write(logData *LogData)

Jump to

Keyboard shortcuts

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