Documentation ¶
Index ¶
- func TraceID(ctx context.Context) string
- type Logger
- type TraceLogger
- func (l *TraceLogger) Debug(ctx context.Context, args ...interface{})
- func (l *TraceLogger) Debugf(ctx context.Context, template string, args ...interface{})
- func (l *TraceLogger) Error(ctx context.Context, args ...interface{})
- func (l *TraceLogger) Errorf(ctx context.Context, template string, args ...interface{})
- func (l *TraceLogger) Info(ctx context.Context, args ...interface{})
- func (l *TraceLogger) Infof(ctx context.Context, template string, args ...interface{})
- func (l *TraceLogger) TraceID(ctx context.Context) string
- func (l *TraceLogger) Warn(ctx context.Context, args ...interface{})
- func (l *TraceLogger) Warnf(ctx context.Context, template string, args ...interface{})
- func (l TraceLogger) With(args ...interface{}) Logger
- func (l *TraceLogger) WithJSON(key string, b []byte) Logger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Logger ¶
type Logger interface { TraceID(ctx context.Context) string Debug(ctx context.Context, args ...interface{}) Debugf(ctx context.Context, template string, args ...interface{}) Info(ctx context.Context, args ...interface{}) Infof(ctx context.Context, template string, args ...interface{}) Warn(ctx context.Context, args ...interface{}) Warnf(ctx context.Context, template string, args ...interface{}) Error(ctx context.Context, args ...interface{}) Errorf(ctx context.Context, template string, args ...interface{}) With(args ...interface{}) Logger WithJSON(key string, b []byte) Logger }
type TraceLogger ¶
type TraceLogger struct {
*zap.SugaredLogger
}
func NewTraceLogger ¶
func NewTraceLogger(logger *zap.SugaredLogger) *TraceLogger
func (*TraceLogger) Debug ¶
func (l *TraceLogger) Debug(ctx context.Context, args ...interface{})
func (*TraceLogger) Debugf ¶
func (l *TraceLogger) Debugf(ctx context.Context, template string, args ...interface{})
func (*TraceLogger) Error ¶
func (l *TraceLogger) Error(ctx context.Context, args ...interface{})
func (*TraceLogger) Errorf ¶
func (l *TraceLogger) Errorf(ctx context.Context, template string, args ...interface{})
func (*TraceLogger) Info ¶
func (l *TraceLogger) Info(ctx context.Context, args ...interface{})
func (*TraceLogger) Infof ¶
func (l *TraceLogger) Infof(ctx context.Context, template string, args ...interface{})
func (*TraceLogger) Warn ¶
func (l *TraceLogger) Warn(ctx context.Context, args ...interface{})
func (*TraceLogger) Warnf ¶
func (l *TraceLogger) Warnf(ctx context.Context, template string, args ...interface{})
func (TraceLogger) With ¶
func (l TraceLogger) With(args ...interface{}) Logger
Click to show internal directories.
Click to hide internal directories.