clog

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2023 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 Logger

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

Logger represents a logging object.

func New

func New(module string, lvl logger.Level, stdoutConsole bool, uncheckedOut ...io.Writer) *Logger

New initializes a new logger

func (*Logger) Close added in v0.2.1

func (l *Logger) Close() error

func (*Logger) Debug

func (l *Logger) Debug(msg string)

func (*Logger) Debugf

func (l *Logger) Debugf(format string, values ...any)

func (*Logger) Error

func (l *Logger) Error(msg string)

func (*Logger) Errorf

func (l *Logger) Errorf(format string, values ...any)

func (*Logger) Fatal

func (l *Logger) Fatal(msg string)

func (*Logger) Fatalf

func (l *Logger) Fatalf(format string, values ...any)

func (*Logger) HasLvl

func (l *Logger) HasLvl(lvl logger.Level) bool

HasLvl checks if a log statement will be printed when sent with a specific level. This can and should be used to see if a log statment should be prepared at all.

func (*Logger) Info

func (l *Logger) Info(msg string)

func (*Logger) Infof

func (l *Logger) Infof(format string, values ...any)

func (*Logger) Print

func (l *Logger) Print(values ...any)

func (*Logger) Printf

func (l *Logger) Printf(format string, values ...any)

func (*Logger) Println

func (l *Logger) Println(values ...any)

func (*Logger) SetLvl

func (l *Logger) SetLvl(lvl logger.Level)

SetLvl will set the global logger to a different Loglevel.

func (*Logger) Warn

func (l *Logger) Warn(msg string)

func (*Logger) Warnf

func (l *Logger) Warnf(format string, values ...any)

func (*Logger) Write

func (l *Logger) Write(data []byte) (int, error)

Jump to

Keyboard shortcuts

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