goworld: github.com/xiaonanln/goworld/engine/gwlog Index | Files

package gwlog

import "github.com/xiaonanln/goworld/engine/gwlog"

Index

Package Files

gwlog.go

func Debugf Uses

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

func Error Uses

func Error(args ...interface{})

func Errorf Uses

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

func Fatal Uses

func Fatal(args ...interface{})

func Fatalf Uses

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

func Infof Uses

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

func Panic Uses

func Panic(args ...interface{})

func Panicf Uses

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

func SetLevel Uses

func SetLevel(lv Level)

SetLevel sets the log level

func SetOutput Uses

func SetOutput(outputs []string)

SetOutput sets the output writer

func SetSource Uses

func SetSource(source_ string)

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

func TraceError Uses

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

TraceError prints the stack and error

func Warnf Uses

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

type Level Uses

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 Uses

func GetLevel() Level

GetLevel get the current log level

func ParseLevel Uses

func ParseLevel(s string) Level

ParseLevel converts string to Levels

Package gwlog imports 6 packages (graph) and is imported by 28 packages. Updated 2018-07-04. Refresh now. Tools for package owners.