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

package gwlog

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


Package Files



var (

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

    // Debugf logs formatted debug message
    Debugf logFormatFunc
    // Infof logs formatted info message
    Infof logFormatFunc
    // Warnf logs formatted warn message
    Warnf logFormatFunc
    // Errorf logs formatted error message
    Errorf logFormatFunc

func Fatalf Uses

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

Fatalf prints formatted fatal message

func GetOutput Uses

func GetOutput() io.Writer

GetOutput returns the output writer

func Panic Uses

func Panic(v interface{})

Panic panics

func Panicf Uses

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

Panicf prints formatted panic message

func SetLevel Uses

func SetLevel(lv Level)

SetLevel sets the log level

func SetOutput Uses

func SetOutput(out io.Writer)

SetOutput sets the output writer

func SetSource Uses

func SetSource(comp 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

type Level Uses

type Level uint8

Level is type of log levels

func ParseLevel Uses

func ParseLevel(lvl string) (Level, error)

ParseLevel parses log level string to Level

func StringToLevel Uses

func StringToLevel(s string) Level

StringToLevel converts string to Levels

Package gwlog imports 6 packages (graph) and is imported by 24 packages. Updated 2017-08-26. Refresh now. Tools for package owners.