logger

package
v0.0.0-...-2cd5006 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2026 License: BSD-2-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LevelLog

type LevelLog struct {
	Logger *log.Logger
	// contains filtered or unexported fields
}

LevelLog custom type to allow a verbose mode and handling of levels with a prefix

func NewLevelLog

func NewLevelLog() *LevelLog

NewLevelLog setups a logger with the proper configuration for the underlying log

func (*LevelLog) Errorf

func (l *LevelLog) Errorf(format string, v ...interface{})

Errorf prints a message with ERROR: prefix using log.Printf

func (*LevelLog) Errorln

func (l *LevelLog) Errorln(v ...interface{})

Errorln prints a message with ERROR: prefix using log.Println

func (*LevelLog) Fatalf

func (l *LevelLog) Fatalf(format string, v ...interface{})

Fatalf prints a message with FATAL: prefix using log.Printf

func (*LevelLog) Fatalln

func (l *LevelLog) Fatalln(v ...interface{})

Fatalln prints a message with FATAL: prefix using log.Println

func (*LevelLog) Infof

func (l *LevelLog) Infof(format string, v ...interface{})

Infof prints a message with INFO: prefix using log.Printf

func (*LevelLog) Infoln

func (l *LevelLog) Infoln(v ...interface{})

Infoln prints a message with INFO: prefix using log.Println

func (*LevelLog) SetVerbosity

func (l *LevelLog) SetVerbosity(verbose bool, quiet bool)

SetVerbose toggles verbose mode

func (*LevelLog) Verbosef

func (l *LevelLog) Verbosef(format string, v ...interface{})

Verbosef prints with log.Printf a message with DEBUG: prefix using log.Printf, only when verbose mode is true

func (*LevelLog) Verboseln

func (l *LevelLog) Verboseln(v ...interface{})

Verboseln prints a message with DEBUG: prefix using log.Println, only when verbose mode is true

func (*LevelLog) Warnf

func (l *LevelLog) Warnf(format string, v ...interface{})

Warnf prints a message with WARN: prefix using log.Printf

func (*LevelLog) Warnln

func (l *LevelLog) Warnln(v ...interface{})

Warnln prints a message with WARN: prefix using log.Println

Jump to

Keyboard shortcuts

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