logger

package
v0.0.0-...-20093e1 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LevelNone = iota
	LevelInfo
	LevelWarning
	LevelError
	LevelVerbose
	LevelDebug
)

Variables

View Source
var (
	DefaultLogFile = "/tmp/logs/sniffer.log"
)

This should correspond to a shared empty dir if being used alongside the scheduler-sniffer

Functions

This section is empty.

Types

type DebugLogger

type DebugLogger struct {
	Filename string
	// contains filtered or unexported fields
}

func NewDebugLogger

func NewDebugLogger(level int, filename string) *DebugLogger

func (*DebugLogger) Debug

func (l *DebugLogger) Debug(message ...any) error

func (*DebugLogger) Error

func (l *DebugLogger) Error(message ...any) error

func (*DebugLogger) Info

func (l *DebugLogger) Info(message ...any) error

Logging functions you should use! Note that prefixes are disabled because we want to parse json in each line

func (*DebugLogger) Start

func (l *DebugLogger) Start() (*log.Logger, error)

func (*DebugLogger) Stop

func (l *DebugLogger) Stop() error

func (*DebugLogger) Verbose

func (l *DebugLogger) Verbose(message ...any) error

func (*DebugLogger) Warning

func (l *DebugLogger) Warning(message ...any) error

Jump to

Keyboard shortcuts

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