mode

package
v0.4.6 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2025 License: GPL-3.0 Imports: 3 Imported by: 12

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type DefaultLogger

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

DefaultLogger is the default mode logger

func NewDefaultLogger

func NewDefaultLogger(logger gologger.Logger) (
	*DefaultLogger,
	error,
)

NewDefaultLogger creates a new default mode logger

func (*DefaultLogger) Critical

func (d *DefaultLogger) Critical(header, subheader string, details *[]string)

Critical logs a critical message

func (*DefaultLogger) Debug

func (d *DefaultLogger) Debug(header, subheader string, details *[]string)

Debug logs a debug message

func (*DefaultLogger) Error

func (d *DefaultLogger) Error(header, subheader string, errors *[]error)

Error logs an error message

func (*DefaultLogger) Info

func (d *DefaultLogger) Info(header, subheader string, details *[]string)

Info logs an info message

func (*DefaultLogger) Log

func (d *DefaultLogger) Log(message *gologger.Message)

Log logs a message

func (*DefaultLogger) RunIfShouldLog

func (d *DefaultLogger) RunIfShouldLog(
	status gologgerstatus.Status,
	fn func(),
)

RunIfShouldLog runs the function if the log should be logged

func (*DefaultLogger) ShouldLog

func (d *DefaultLogger) ShouldLog(status gologgerstatus.Status) bool

ShouldLog checks if the log should be logged

func (*DefaultLogger) Warning

func (d *DefaultLogger) Warning(header, subheader string, details *[]string)

Warning logs a warning message

type Logger

type Logger interface {
	ShouldLog(status gologgerstatus.Status) bool
	RunIfShouldLog(status gologgerstatus.Status, fn func())
	gologger.Logger
}

Logger interface for the mode logger

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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