logging

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitLogger

func InitLogger(config *LogConfig)

Types

type LogConfig

type LogConfig struct {
	// Level the log level
	Level zerolog.Level

	// ConsoleLoggingEnabled console logging enabled or not
	ConsoleLoggingEnabled bool

	// FileLoggingEnabled makes the framework log to a file
	// the fields below can be skipped if this value is false
	FileLoggingEnabled bool

	// Directory to log to when file logging is enabled
	Directory string

	// Filename is the name of the logfile which will be placed inside the directory
	Filename string

	// MaxSize the max size in MB of the logfile before it's rolled
	MaxSize int

	// MaxBackups the max number of rolled files to keep
	MaxBackups int
}

LogConfig for logging

type MemberlistLogger

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

func NewMemberlistLogger

func NewMemberlistLogger() *MemberlistLogger

func (*MemberlistLogger) Write

func (m *MemberlistLogger) Write(p []byte) (int, error)

Jump to

Keyboard shortcuts

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