gwlog

package
v0.1.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
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
)

Functions

func Fatalf

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

Fatalf prints formatted fatal message

func GetOutput

func GetOutput() io.Writer

GetOutput returns the output writer

func Panic

func Panic(v interface{})

Panic panics

func Panicf

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

Panicf prints formatted panic message

func SetLevel

func SetLevel(lv Level)

SetLevel sets the log level

func SetOutput

func SetOutput(out io.Writer)

SetOutput sets the output writer

func SetSource

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

Types

type Level

type Level uint8

Level is type of log levels

func ParseLevel

func ParseLevel(lvl string) (Level, error)

ParseLevel parses log level string to Level

func StringToLevel

func StringToLevel(s string) Level

StringToLevel converts string to Levels

Jump to

Keyboard shortcuts

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