logger

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2022 License: Apache-2.0 Imports: 5 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewNATSLogger added in v1.5.0

func NewNATSLogger(logger Logger, enabled bool) gnatsd.Logger

NewNATSLogger creates a NATS logger that writes log messages to the given Logger.

Types

type Logger

type Logger interface {
	Fatalf(string, ...interface{})
	Debugf(string, ...interface{})
	Errorf(string, ...interface{})
	Infof(string, ...interface{})
	Warnf(string, ...interface{})
	Debug(...interface{})
	Warn(...interface{})
	Info(...interface{})
	Fatal(...interface{})
	Silent(bool)
	Prefix(string)
}

Logger interface is used to allow tests to inject custom loggers.

func NewLogger

func NewLogger(level uint32) Logger

NewLogger returns a new Logger instance backed by Logrus.

Jump to

Keyboard shortcuts

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