logger

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2021 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug added in v1.0.0

func Debug(gokaDebug, saramaDebug bool)

Debug enables or disables debug logging using the global logger.

func SetSaramaLogger added in v1.0.0

func SetSaramaLogger(logger Logger)

Types

type Logger

type Logger interface {

	// Print will simply print the params
	Print(...interface{})

	// Print will simply print the params
	Println(...interface{})

	// Printf will be used for informational messages. These can be thought of
	// having an 'Info'-level in a structured logger.
	Printf(string, ...interface{})

	// Debugf is used for debugging messages, mostly for debugging goka itself.
	// It is turned off unless goka is initialized
	Debugf(string, ...interface{})

	// Panicf will be only called an unexpected programming error such as a type
	// assertion which should never fail. Regular errors will be returned out
	// from the library.
	Panicf(string, ...interface{})

	// PrefixedLogger returns a logger that prefixes all messages with passed prefix
	Prefix(string) Logger
}

Logger is the interface Goka and its subpackages use for logging.

func Default

func Default() Logger

Default returns the standard library logger

type Prefixer added in v1.0.0

type Prefixer interface {
	CurrentPrefix() string
	StackPrefix(prefix string) Prefixer
}

Prefixer abstracts the functionality of stacking the prefix for a custom logger implementation

func EmptyPrefixer added in v1.0.0

func EmptyPrefixer() Prefixer

EmptyPrefixer encapsulates a prefixer that is initially without a prefix

Jump to

Keyboard shortcuts

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