logger

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: May 9, 2023 License: MIT Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LoggerFactory

type LoggerFactory struct {
	Writer          io.Writer
	DefaultLogLevel logging.LogLevel
	ScopeLevels     map[string]logging.LogLevel
	Loggers         map[string]*logging.DefaultLeveledLogger
}

LoggerFactory defines levels by scopes and creates new LeveledLogger.

func NewLoggerFactory

func NewLoggerFactory(levelSpec string) *LoggerFactory

NewLoggerFactory sets up a scoped logger for STUNner.

func (*LoggerFactory) NewLogger

func (f *LoggerFactory) NewLogger(scope string) logging.LeveledLogger

NewLogger either returns the existing LeveledLoogger (if it exists) for the given scope or creates a new one.

func (*LoggerFactory) SetLevel

func (f *LoggerFactory) SetLevel(levelSpec string)

Setlevel sets the loglevel.

Jump to

Keyboard shortcuts

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