gwlog

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2018 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debugf

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

func Error added in v0.1.4

func Error(args ...interface{})

func Errorf

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

func Fatal added in v0.1.4

func Fatal(args ...interface{})

func Fatalf

func Fatalf(format string, 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 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 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 added in v0.1.4

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