gwlog

package
v0.0.0-...-1c1c5e2 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(args ...interface{})

func Debugf

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

func Error

func Error(args ...interface{})

func Errorf

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

func Fatal

func Fatal(args ...interface{})

func Fatalf

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

func Info

func Info(args ...interface{})

func Infof

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

func Panic

func Panic(args ...interface{})

func Panicf

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

func SetLevel

func SetLevel(lv Level)

SetLevel sets the log level

func SetOutput

func SetOutput(outputs []string)

SetOutput sets the output writer

func SetRotateFile

func SetRotateFile(logfile string, logstd bool)

SetRotateFile sets the output writer

func SetSource

func SetSource(source_ string)

SetSource sets the component name (dispatcher/gate/game) of gwlog module

func TraceError

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

TraceError prints the stack and error

func Warn

func Warn(args ...interface{})

func Warnf

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

Types

type Level

type Level = zapcore.Level

Level is type of log levels

var (
	// DebugLevel level
	DebugLevel Level = Level(zap.DebugLevel)
	// InfoLevel level
	InfoLevel Level = Level(zap.InfoLevel)
	// WarnLevel level
	WarnLevel Level = Level(zap.WarnLevel)
	// ErrorLevel level
	ErrorLevel Level = Level(zap.ErrorLevel)
	// PanicLevel level
	PanicLevel Level = Level(zap.PanicLevel)
	// FatalLevel level
	FatalLevel Level = Level(zap.FatalLevel)
)

func GetLevel

func GetLevel() Level

GetLevel get the current log level

func ParseLevel

func ParseLevel(s string) Level

ParseLevel converts string to Levels

Jump to

Keyboard shortcuts

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