logging

package
v0.0.0-...-43d4caf Latest Latest
Warning

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

Go to latest
Published: May 30, 2024 License: AGPL-3.0 Imports: 0 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FakeLogger

type FakeLogger struct {
}

func (FakeLogger) Debug

func (f FakeLogger) Debug(msg string, ctx ...interface{})

func (FakeLogger) Error

func (f FakeLogger) Error(msg string, ctx ...interface{})

func (FakeLogger) Info

func (f FakeLogger) Info(msg string, ctx ...interface{})

func (FakeLogger) Log

func (f FakeLogger) Log(keyvals ...interface{}) error

func (FakeLogger) New

func (f FakeLogger) New(ctx ...interface{}) Logger

func (FakeLogger) Warn

func (f FakeLogger) Warn(msg string, ctx ...interface{})

type Logger

type Logger interface {
	// New returns a new contextual Logger that has this logger's context plus the given context.
	New(ctx ...interface{}) Logger

	Log(keyvals ...interface{}) error

	// Debug logs a message with debug level and key/value pairs, if any.
	Debug(msg string, ctx ...interface{})

	// Info logs a message with info level and key/value pairs, if any.
	Info(msg string, ctx ...interface{})

	// Warn logs a message with warning level and key/value pairs, if any.
	Warn(msg string, ctx ...interface{})

	// Error logs a message with error level and key/value pairs, if any.
	Error(msg string, ctx ...interface{})
}

type LoggerFactory

type LoggerFactory func(loggerName string, ctx ...interface{}) Logger

Jump to

Keyboard shortcuts

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