log

package
v0.51.0-rc.4 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2024 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Package log holds log related files

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

type Logger interface {
	// Infof is used to print a info level log
	Infof(format string, params ...interface{})
	// Tracef is used to print a trace level log
	Tracef(format string, params ...interface{})
	// Debugf is used to print a trace level log
	Debugf(format string, params ...interface{})
	// Errorf is used to print an error
	Errorf(format string, params ...interface{})

	IsTracing() bool
}

Logger interface used to remove the dependency of this package to the logger of the agent

func OrNullLogger

func OrNullLogger(potential Logger) Logger

OrNullLogger ensures that the provided logger is non-nil by returning a NullLogger if it is

type NullLogger

type NullLogger struct{}

NullLogger is a default implementation of the Logger interface

func (NullLogger) Debugf

func (l NullLogger) Debugf(_ string, _ ...interface{})

Debugf is used to print a trace level log

func (NullLogger) Errorf

func (l NullLogger) Errorf(_ string, _ ...interface{})

Errorf is used to print an error

func (NullLogger) Infof

func (l NullLogger) Infof(_ string, _ ...interface{})

Infof is used to print an info

func (NullLogger) IsTracing

func (l NullLogger) IsTracing() bool

IsTracing is used to check if TraceF would actually log

func (NullLogger) Tracef

func (l NullLogger) Tracef(_ string, _ ...interface{})

Tracef is used to print a trace level log

Jump to

Keyboard shortcuts

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