Documentation ¶
Index ¶
- Variables
- func Close()
- func Config(opts ...ConfigOption) error
- func Debug(args ...interface{})
- func Debugf(template string, args ...interface{})
- func Error(args ...interface{})
- func Errorf(template string, args ...interface{})
- func Info(args ...interface{})
- func Infof(template string, args ...interface{})
- func Panic(args ...interface{})
- func Panicf(template string, args ...interface{})
- func Register(builder Builder)
- func Warn(args ...interface{})
- func Warnf(template string, args ...interface{})
- func WithContext(ctx context.Context, l Logger) context.Context
- type Builder
- type ConfigOption
- type Level
- type Logger
- type Option
- type Options
- type ServerOption
- type Wraper
- func (l *Wraper) Close()
- func (l *Wraper) Debug(args ...interface{})
- func (l *Wraper) Debugf(format string, args ...interface{})
- func (l *Wraper) Error(args ...interface{})
- func (l *Wraper) Errorf(format string, args ...interface{})
- func (l *Wraper) Fatal(args ...interface{})
- func (l *Wraper) Fatalf(format string, args ...interface{})
- func (l *Wraper) Info(args ...interface{})
- func (l *Wraper) Infof(format string, args ...interface{})
- func (l *Wraper) Log(level Level, args ...interface{})
- func (l *Wraper) Logf(level Level, format string, args ...interface{})
- func (l *Wraper) Name() string
- func (l *Wraper) Panic(args ...interface{})
- func (l *Wraper) Panicf(format string, args ...interface{})
- func (l *Wraper) SessionID() string
- func (l *Wraper) Warn(args ...interface{})
- func (l *Wraper) Warnf(format string, args ...interface{})
- func (l *Wraper) Write(p []byte) (n int, err error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DefaultLogger Logger DefaultBuilder Builder )
View Source
var ( LevelAll xlog.Level = xlog.LevelAll LevelDebug xlog.Level = xlog.LevelDebug LevelInfo xlog.Level = xlog.LevelInfo LevelWarn xlog.Level = xlog.LevelWarn LevelError xlog.Level = xlog.LevelError LevelPanic xlog.Level = xlog.LevelPanic LevelFatal xlog.Level = xlog.LevelFatal LevelOff xlog.Level = xlog.LevelOff )
View Source
var ( WithName = xlog.WithName WithSid = xlog.WithSid WithSrvType = xlog.WithSrvType WithField = xlog.WithField WithFields = xlog.WithFields )
View Source
var ( WithConfigPath = xlog.WithConfigPath WithLayout = xlog.WithLayout WithConcurrency = xlog.WithConcurrency )
Functions ¶
func Config ¶ added in v0.5.12
func Config(opts ...ConfigOption) error
Types ¶
type Builder ¶
func GetBuilder ¶ added in v0.1.31
type ConfigOption ¶ added in v0.5.12
type ConfigOption = xlog.ConfigOption
type Logger ¶
type Logger interface { Name() string SessionID() string Log(level Level, args ...interface{}) Logf(level Level, format string, args ...interface{}) Info(args ...interface{}) Infof(format string, args ...interface{}) Error(args ...interface{}) Errorf(format string, args ...interface{}) Debug(args ...interface{}) Debugf(format string, args ...interface{}) Panic(args ...interface{}) Panicf(format string, args ...interface{}) Fatal(args ...interface{}) Fatalf(format string, args ...interface{}) Warn(v ...interface{}) Warnf(format string, v ...interface{}) Write(p []byte) (n int, err error) Close() }
type Options ¶ added in v0.1.13
type ServerOption ¶ added in v0.1.13
type ServerOption func(opt *Options)
func Excludes
deprecated
added in
v0.1.13
func Excludes(excludes ...string) ServerOption
Deprecated: use func (e *Server) Handle(path string, obj interface{}, opts ...engine.RouterOption) 中Opts代替
func WithHeaders ¶ added in v0.5.22
func WithHeaders(keys ...constants.HeaderGetter) ServerOption
func WithRequest ¶ added in v0.1.13
func WithRequest() ServerOption
func WithResponse ¶ added in v0.1.13
func WithResponse() ServerOption
func WithSource ¶ added in v0.5.22
func WithSource(include bool) ServerOption
Click to show internal directories.
Click to hide internal directories.