Documentation ¶
Index ¶
- func FieldsFromCtx(ctx context.Context) []zap.Field
- type DefaultLogger
- func (l DefaultLogger) Debug(_ context.Context, msg string, args ...interface{})
- func (l DefaultLogger) Error(_ context.Context, msg string, args ...interface{})
- func (l DefaultLogger) Info(_ context.Context, msg string, args ...interface{})
- func (l DefaultLogger) Warn(_ context.Context, msg string, args ...interface{})
- type Logger
- func (l Logger) Debug(ctx context.Context, msg string, args ...interface{})
- func (l Logger) Error(ctx context.Context, msg string, args ...interface{})
- func (l Logger) Info(ctx context.Context, msg string, args ...interface{})
- func (l Logger) Warn(ctx context.Context, msg string, args ...interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DefaultLogger ¶ added in v0.3.20
type DefaultLogger struct{}
DefaultLogger is a default logging struct.
func (DefaultLogger) Debug ¶ added in v0.3.20
func (l DefaultLogger) Debug(_ context.Context, msg string, args ...interface{})
Debug logs debug information. Parameters:
_ context.Context: Contextual information, not used in this implementation. msg string: The message to be printed. args ...interface{}: Variables to be formatted into the message.
func (DefaultLogger) Error ¶ added in v0.3.20
func (l DefaultLogger) Error(_ context.Context, msg string, args ...interface{})
Error logs error messages. Parameters are the same as the Debug function.
type Logger ¶ added in v0.3.20
type Logger struct {
// contains filtered or unexported fields
}
Logger defines a structure for the logger.
func (Logger) Debug ¶ added in v0.3.20
Debug logs a message with context at the debug level. ctx: The context carrying additional log fields. msg: The main log message. args: Parameters used to format the msg.
func (Logger) Error ¶ added in v0.3.20
Error logs a message with context at the error level. Similar to Debug but records logs at the error level.
Click to show internal directories.
Click to hide internal directories.