garm/vendor/github.com/go-macaroon-bakery/macaroon-bakery/v3/bakery/logger.go
Gabriel Adrian Samfira c61b7fd268
Update go modules
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2023-03-12 16:22:37 +02:00

28 lines
760 B
Go

package bakery
import (
"context"
)
// Logger is used by the bakery to log informational messages
// about bakery operations.
type Logger interface {
Infof(ctx context.Context, f string, args ...interface{})
Debugf(ctx context.Context, f string, args ...interface{})
}
// DefaultLogger returns a Logger instance that does nothing.
//
// Deprecated: DefaultLogger exists for historical compatibility
// only. Previously it logged using github.com/juju/loggo.
func DefaultLogger(name string) Logger {
return nopLogger{}
}
type nopLogger struct{}
// Debugf implements Logger.Debugf.
func (nopLogger) Debugf(context.Context, string, ...interface{}) {}
// Debugf implements Logger.Infof.
func (nopLogger) Infof(context.Context, string, ...interface{}) {}