logex: github.com/chzyer/logex Index | Files

package logex

import "github.com/chzyer/logex"

Index

Package Files

err.go logex.go

Variables

var (
    Println    = std.Println
    Infof      = std.Infof
    Info       = std.Info
    Debug      = std.Debug
    Debugf     = std.Debugf
    Error      = std.Error
    Errorf     = std.Errorf
    Warn       = std.Warn
    PrintStack = std.PrintStack
    Stack      = std.Stack
    Panic      = std.Panic
    Fatal      = std.Fatal
    Struct     = std.Struct
    Pretty     = std.Pretty
    Todo       = std.Todo
)
var (
    INFO   = "[INFO] "
    ERROR  = "[ERROR] "
    PANIC  = "[PANIC] "
    DEBUG  = "[DEBUG] "
    WARN   = "[WARN] "
    FATAL  = "[FATAL] "
    STRUCT = "[STRUCT] "
    PRETTY = "[PRETTY] "
    TODO   = "[TODO] "
)
var DebugLevel = 1
var ShowCode = true

func DecodeError Uses

func DecodeError(e error) string

func Define Uses

func Define(info string) *traceError

func Equal Uses

func Equal(e1, e2 error) bool

func EqualAny Uses

func EqualAny(e error, es []error) bool

func NewError Uses

func NewError(info ...interface{}) *traceError

func NewErrorf Uses

func NewErrorf(format string, info ...interface{}) *traceError

func NewGoLog Uses

func NewGoLog(w io.Writer) *goLog.Logger

func SetStd Uses

func SetStd(l *Logger)

func Sprint Uses

func Sprint(o ...interface{}) string

func Sprintf Uses

func Sprintf(f string, o ...interface{}) string

func Trace Uses

func Trace(err error, info ...interface{}) error

func TraceError Uses

func TraceError(err error, info ...interface{}) *traceError

set runtime info to error

func TraceEx Uses

func TraceEx(depth int, err error, info ...interface{}) *traceError

func Tracef Uses

func Tracef(err error, obj ...interface{}) *traceError

func Tracefmt Uses

func Tracefmt(layout string, objs ...interface{}) error

type Logger Uses

type Logger struct {
    Logger *goLog.Logger
    // contains filtered or unexported fields
}

func DownLevel Uses

func DownLevel(i int) Logger

func NewLogger Uses

func NewLogger(l int) *Logger

func NewLoggerEx Uses

func NewLoggerEx(w io.Writer) *Logger

func (Logger) Debug Uses

func (l Logger) Debug(o ...interface{})

func (Logger) Debugf Uses

func (l Logger) Debugf(f string, o ...interface{})

func (Logger) DownLevel Uses

func (l Logger) DownLevel(i int) Logger

decide to show which level's stack

func (Logger) Error Uses

func (l Logger) Error(o ...interface{})

func (Logger) Errorf Uses

func (l Logger) Errorf(f string, o ...interface{})

func (Logger) Fatal Uses

func (l Logger) Fatal(o ...interface{})

func (Logger) Fatalf Uses

func (l Logger) Fatalf(f string, o ...interface{})

func (Logger) Info Uses

func (l Logger) Info(o ...interface{})

func (Logger) Infof Uses

func (l Logger) Infof(f string, o ...interface{})

func (Logger) Output Uses

func (l Logger) Output(calldepth int, s string) error

func (Logger) Panic Uses

func (l Logger) Panic(o ...interface{})

func (Logger) Panicf Uses

func (l Logger) Panicf(f string, o ...interface{})

func (Logger) Pretty Uses

func (l Logger) Pretty(os ...interface{})

output objects to json format

func (Logger) Print Uses

func (l Logger) Print(o ...interface{})

just print

func (Logger) PrintStack Uses

func (l Logger) PrintStack()

func (Logger) Printf Uses

func (l Logger) Printf(layout string, o ...interface{})

just print by format

func (Logger) Println Uses

func (l Logger) Println(o ...interface{})

just println

func (Logger) Stack Uses

func (l Logger) Stack() []byte

func (Logger) Struct Uses

func (l Logger) Struct(o ...interface{})

func (Logger) Todo Uses

func (l Logger) Todo(o ...interface{})

func (Logger) Warn Uses

func (l Logger) Warn(o ...interface{})

func (Logger) Warnf Uses

func (l Logger) Warnf(f string, o ...interface{})

Package logex imports 11 packages (graph) and is imported by 19 packages. Updated 2017-04-14. Refresh now. Tools for package owners.