log

package
v0.0.0-...-5b533d1 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2019 License: GPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

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

Debug log, use prefix logger instead.

func Error

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

Error log, use prefix logger instea.

func Info

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

Info log, use prefix logger instead.

func Init

func Init(logLevel string, logTo string)

Init log for use, should init only once.

func Warn

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

Warn log, use prefix logger instead.

Types

type PrefixLogger

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

PrefixLogger is a logger with prefix

func NewPrefixLogger

func NewPrefixLogger(pfx ...string) PrefixLogger

NewPrefixLogger set prefixs for logger

func (*PrefixLogger) AddPrefix

func (pf *PrefixLogger) AddPrefix(pfx string)

AddPrefix add prefix to log.

func (*PrefixLogger) Debug

func (pf *PrefixLogger) Debug(format string, args ...interface{})

Debug log

func (*PrefixLogger) Error

func (pf *PrefixLogger) Error(format string, args ...interface{})

Error log

func (*PrefixLogger) Info

func (pf *PrefixLogger) Info(format string, args ...interface{})

Info log

func (*PrefixLogger) ReplacePrefix

func (pf *PrefixLogger) ReplacePrefix(old string, new string)

func (*PrefixLogger) Warn

func (pf *PrefixLogger) Warn(format string, args ...interface{})

Warn log

Jump to

Keyboard shortcuts

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