logger

package
v0.10.6 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2022 License: MIT Imports: 6 Imported by: 0

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)

NewLogger returns a configured LeveledLogger for the given , argsscope

Jump to

Keyboard shortcuts

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