Documentation
¶
Index ¶
- type Logger
- func (o *Logger) Child(name string, opts ...Option) *Logger
- func (o *Logger) Debug(ctx context.Context, msg string, attrs ...attribute.KeyValue)
- func (o *Logger) Error(ctx context.Context, msg string, attrs ...attribute.KeyValue)
- func (o *Logger) Info(ctx context.Context, msg string, attrs ...attribute.KeyValue)
- func (o *Logger) Trace(ctx context.Context, msg string, attrs ...attribute.KeyValue)
- func (o *Logger) Warn(ctx context.Context, msg string, attrs ...attribute.KeyValue)
- func (o *Logger) With(attrs ...attribute.KeyValue) *Logger
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
func (*Logger) Child ¶ added in v0.2.0
Child creates a new logger that will share the attributes from the parent logger.
func (*Logger) With ¶ added in v0.2.0
With returns a logger with the same configuration as this logger, but with additional attributes. It reuses the logger from the original logger. This should not be confused with Child(), which should be used to create a _new_ logger that inherits the parent's attributes.
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
func WithAttributes ¶
func WithLoggerOpts ¶
func WithLoggerOpts(opts ...log.LoggerOption) Option
func WithLoggerProvider ¶
func WithLoggerProvider(p log.LoggerProvider) Option
Click to show internal directories.
Click to hide internal directories.