logger

package
v0.0.17 Latest Latest
Warning

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

Go to latest
Published: May 25, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

type Logger interface {
	Log(message string, args ...any)
	Debug(message string, args ...any)
}

Logger defines an interface on what to do about logging messages. The user can decide whether to log debug messages or not. In the code there is just one logger which is either a verbose logger or a quite one.

type QuiteLogger

type QuiteLogger struct{}

QuiteLogger 's LogDebug is ignored.

func (*QuiteLogger) Debug

func (*QuiteLogger) Debug(message string, args ...any)

Debug is ignored.

func (*QuiteLogger) Log

func (*QuiteLogger) Log(message string, args ...any)

Log just logs normal messages.

type VerboseLogger

type VerboseLogger struct{}

VerboseLogger logs debug messages.

func (*VerboseLogger) Debug

func (*VerboseLogger) Debug(message string, args ...any)

Debug is used for messages which can normally be ignored.

func (*VerboseLogger) Log

func (*VerboseLogger) Log(message string, args ...any)

Log just logs normal messages.

Jump to

Keyboard shortcuts

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