watermilllogr

package module
v0.0.0-...-a6ac7d4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 4, 2024 License: MIT Imports: 3 Imported by: 0

README

watermilllogr

Go Report Card

This package provides a watermill.LoggerAdapter that wraps a go-logr/logr Logger.

Notes

  • Debug calls logr.Logger.V(1).Info(...)
  • Trace called logr.Logger.V(2).Info(...)

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NotImplemented = errors.New("not implemented")

Functions

func NewLogger

func NewLogger(l *logr.Logger) watermill.LoggerAdapter

NewLogger returns new watermill.LoggerAdapter using passed *zap.Logger as backend.

Types

type Logger

type Logger struct {
	// contains filtered or unexported fields
}

Implements the Watermill LoggerAdapter with the logr Logger interface

func (*Logger) Debug

func (l *Logger) Debug(msg string, fields watermill.LogFields)

func (*Logger) Error

func (l *Logger) Error(msg string, err error, fields watermill.LogFields)

func (*Logger) Info

func (l *Logger) Info(msg string, fields watermill.LogFields)

func (*Logger) Trace

func (l *Logger) Trace(msg string, fields watermill.LogFields)

func (*Logger) With

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL