Documentation ¶
Index ¶
- type Logger
- func (logger *Logger) DebugContext(ctx context.Context, args ...interface{})
- func (logger *Logger) DebugfContext(ctx context.Context, template string, args ...interface{})
- func (logger *Logger) ErrorContext(ctx context.Context, args ...interface{})
- func (logger *Logger) ErrorfContext(ctx context.Context, template string, args ...interface{})
- func (logger *Logger) InfoContext(ctx context.Context, args ...interface{})
- func (logger *Logger) InfofContext(ctx context.Context, template string, args ...interface{})
- func (logger *Logger) WarnContext(ctx context.Context, args ...interface{})
- func (logger *Logger) WarnfContext(ctx context.Context, template string, args ...interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Logger ¶
type Logger struct {
*zap.SugaredLogger
}
Logger provides the logging functionality.
func NewTestLogger ¶
NewTestLogger initializes a test Logger instance that is useful for testing purpose.
func (*Logger) DebugContext ¶
DebugContext uses fmt.Sprint to construct and log a message with the `trace_id` found in the context.
func (*Logger) DebugfContext ¶
DebugfContext uses fmt.Sprintf to log a templated message with the `trace_id` found in the context.
func (*Logger) ErrorContext ¶
ErrorContext uses fmt.Sprint to construct and log a message with the `trace_id` found in the context.
func (*Logger) ErrorfContext ¶
ErrorfContext uses fmt.Sprintf to log a templated message with the `trace_id` found in the context.
func (*Logger) InfoContext ¶
InfoContext uses fmt.Sprint to construct and log a message with the `trace_id` found in the context.
func (*Logger) InfofContext ¶
InfofContext uses fmt.Sprintf to log a templated message with the `trace_id` found in the context.
func (*Logger) WarnContext ¶
WarnContext uses fmt.Sprint to construct and log a message with the `trace_id` found in the context.