logger

package
v1.14.0-RC2 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2024 License: MIT Imports: 4 Imported by: 3

Documentation

Index

Constants

View Source
const (
	NONE  = 0
	FATAL = 1
	ERROR = 2
	INFO  = 3
	DEBUG = 4
)

Variables

This section is empty.

Functions

func SyncLoggers

func SyncLoggers(loggers []*Logger)

SyncLoggers - syncs the loggers

Types

type Logger

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

func (*Logger) Close

func (l *Logger) Close()

func (*Logger) Debug

func (l *Logger) Debug(v ...interface{})

func (*Logger) Error

func (l *Logger) Error(v ...interface{})

func (*Logger) Fatal

func (l *Logger) Fatal(v ...interface{})

func (*Logger) Info

func (l *Logger) Info(v ...interface{})

func (*Logger) Init

func (l *Logger) Init(lvl int, prefix string)

Init - Initialize logging

func (*Logger) SetLevel

func (l *Logger) SetLevel(lvl int)

SetLevel - Configures the log level. Higher the number more verbose.

func (*Logger) SetLogFile

func (l *Logger) SetLogFile(logFile io.Writer, verbose bool)

SetLogFile - Writes log to the file. set verbose false disables log to os.Stderr

Jump to

Keyboard shortcuts

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