logger

package
v0.0.0-...-f495dfb Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Debug = iota
	Info
	Warn
	Error
)
View Source
const (
	LOG_CHAN_SIZE = 10
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DualLogger

type DualLogger struct {
	// contains filtered or unexported fields
}

func (*DualLogger) Close

func (logger *DualLogger) Close() error

Warning: not thread safe!

func (*DualLogger) LogDebug

func (logger *DualLogger) LogDebug(msg string)

func (*DualLogger) LogError

func (logger *DualLogger) LogError(msg string)

func (*DualLogger) LogInfo

func (logger *DualLogger) LogInfo(msg string)

func (*DualLogger) LogWarn

func (logger *DualLogger) LogWarn(msg string)

type LogLevel

type LogLevel int

type Logger

type Logger interface {
	LogDebug(msg string)
	LogInfo(msg string)
	LogWarn(msg string)
	LogError(msg string)

	Close() error
}

func CreateDualLogger

func CreateDualLogger(filePath string, logLevel LogLevel) (Logger, error)

Jump to

Keyboard shortcuts

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