Documentation ¶
Index ¶
- Constants
- func SetLogger(newLogger Logger)
- type CodecEmpty
- type DefaultLogger
- func (l *DefaultLogger) Debugf(ctx context.Context, format string, args ...interface{})
- func (l *DefaultLogger) Errorf(ctx context.Context, format string, args ...interface{})
- func (l *DefaultLogger) Infof(ctx context.Context, format string, args ...interface{})
- func (l *DefaultLogger) Warnf(ctx context.Context, format string, args ...interface{})
- type LogData
- type Logger
Constants ¶
View Source
const ( LevelDebug = "DEBUG" LevelInfo = "INFO" LevelWarn = "WARN" LevelError = "ERROR" LogPrefix = "SERVER_ON_GNET" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CodecEmpty ¶
type CodecEmpty struct{}
func (*CodecEmpty) Decode ¶
func (ce *CodecEmpty) Decode(c gnet.Conn) ([]byte, error)
type DefaultLogger ¶
type DefaultLogger struct{}
func (*DefaultLogger) Debugf ¶
func (l *DefaultLogger) Debugf(ctx context.Context, format string, args ...interface{})
func (*DefaultLogger) Errorf ¶
func (l *DefaultLogger) Errorf(ctx context.Context, format string, args ...interface{})
type LogData ¶
type LogData struct { Prefix string `json:"prefix"` Time string `json:"time"` Level string `json:"level"` Content string `json:"content"` }
func (*LogData) EncodeToStr ¶
Click to show internal directories.
Click to hide internal directories.