Documentation
¶
Index ¶
- func Start(ctx context.Context) (log.CoreLogger, error)
- func StartSpanLog(ctx context.Context, traceName string, attributes ...attribute.KeyValue) *spanLog
- type Config
- type OpentelLogHandler
- func (h *OpentelLogHandler) Enabled(context context.Context, level slog.Level) bool
- func (h *OpentelLogHandler) Handle(context context.Context, record slog.Record) error
- func (h *OpentelLogHandler) WithAttrs(attrs []slog.Attr) slog.Handler
- func (h *OpentelLogHandler) WithGroup(name string) slog.Handler
- type OpentelLogger
- func (l *OpentelLogger) Debug(ctx context.Context, msg string, args ...any)
- func (l *OpentelLogger) DebugContext(msg string, args ...any)
- func (l *OpentelLogger) Error(ctx context.Context, msg string, args ...any)
- func (l *OpentelLogger) ErrorContext(msg string, args ...any)
- func (l *OpentelLogger) Info(ctx context.Context, msg string, args ...any)
- func (l *OpentelLogger) InfoContext(msg string, args ...any)
- func (l *OpentelLogger) Warn(ctx context.Context, msg string, args ...any)
- func (l *OpentelLogger) WarnContext(msg string, args ...any)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type OpentelLogHandler ¶
func NewOpentelLogHandler ¶
func NewOpentelLogHandler(level slog.Level) *OpentelLogHandler
type OpentelLogger ¶
type OpentelLogger struct {
// contains filtered or unexported fields
}
func NewOpentelLogger ¶
func NewOpentelLogger(logLevel slog.Level) *OpentelLogger
func (*OpentelLogger) Debug ¶
func (l *OpentelLogger) Debug(ctx context.Context, msg string, args ...any)
func (*OpentelLogger) DebugContext ¶
func (l *OpentelLogger) DebugContext(msg string, args ...any)
func (*OpentelLogger) Error ¶
func (l *OpentelLogger) Error(ctx context.Context, msg string, args ...any)
func (*OpentelLogger) ErrorContext ¶
func (l *OpentelLogger) ErrorContext(msg string, args ...any)
func (*OpentelLogger) Info ¶
func (l *OpentelLogger) Info(ctx context.Context, msg string, args ...any)
func (*OpentelLogger) InfoContext ¶
func (l *OpentelLogger) InfoContext(msg string, args ...any)
func (*OpentelLogger) Warn ¶
func (l *OpentelLogger) Warn(ctx context.Context, msg string, args ...any)
func (*OpentelLogger) WarnContext ¶
func (l *OpentelLogger) WarnContext(msg string, args ...any)
Click to show internal directories.
Click to hide internal directories.