logging

package module
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: MIT Imports: 9 Imported by: 1

README

logging

GoLang tools library for logging

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	LogRotateMBytes     uint16 = 16
	LogRotateFiles      uint16 = 64
	LogVerbosity               = 2
	LogConsoleThreshold        = int8(zerolog.TraceLevel)
	DefaultLogger              = NewLogger("")
)

Functions

func NewLogger

func NewLogger(path string) *slog.Logger

func NewLogr added in v0.1.0

func NewLogr(path string) logr.Logger

func NewLumberjack

func NewLumberjack(fileMBytes uint16, fileCount uint16, path string) *lumberjack.Logger

func NewZerolog

func NewZerolog(writers ...io.Writer) *zerolog.Logger

Types

type ThresholdWriter

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

func NewThresholdConsole

func NewThresholdConsole() *ThresholdWriter

func (*ThresholdWriter) Write

func (t *ThresholdWriter) Write(bytes []byte) (n int, err error)

func (*ThresholdWriter) WriteLevel

func (t *ThresholdWriter) WriteLevel(level zerolog.Level, bytes []byte) (n int, err error)

Jump to

Keyboard shortcuts

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