logger

package
v0.2.6 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2024 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// DebugMode sets debug mode flag
	DebugMode = false
)

Functions

func Debug

func Debug(text string)

Debug print debug to stderr

func Debugf

func Debugf(format string, a ...interface{})

Debugf print debug to stderr

func Error

func Error(err error)

Error print error to stderr

func Errorf

func Errorf(format string, a ...interface{})

Errorf print error to stderr

func Fatal

func Fatal(err error)

Fatal error and exit

func Fatalf

func Fatalf(format string, a ...interface{})

Fatalf error and exit

func Info

func Info(text string)

Info print info to stdout

func InfoErr

func InfoErr(text string)

InfoErr print info to stderr

func InfoErrf

func InfoErrf(format string, a ...interface{})

InfoErrf print info to stederr

func Infof

func Infof(format string, a ...interface{})

Infof print info to stdout

func Warn

func Warn(text string)

Warn print warning to stderr

func Warnf

func Warnf(format string, a ...interface{})

Warnf print warning to stderr

Types

type FileLogger

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

FileLogger a file logger

func NewFileLogger

func NewFileLogger() *FileLogger

NewFileLogger a file logger

func (*FileLogger) Close

func (fl *FileLogger) Close()

Close close the file

func (*FileLogger) Error

func (fl *FileLogger) Error(err error)

Error print error to stderr

func (*FileLogger) Errorf

func (fl *FileLogger) Errorf(format string, a ...interface{})

Errorf print error to stderr

func (*FileLogger) GetPath

func (fl *FileLogger) GetPath() string

GetPath return the path where logs are pushed

func (*FileLogger) Warn

func (fl *FileLogger) Warn(text string)

Warn print warning to stderr

func (*FileLogger) Warnf

func (fl *FileLogger) Warnf(format string, a ...interface{})

Warnf print warning to stderr

Jump to

Keyboard shortcuts

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