log

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2024 License: Apache-2.0 Imports: 1 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(args ...interface{})

func Debugf

func Debugf(format string, args ...interface{})

func Error

func Error(args ...interface{})

func Errorf

func Errorf(format string, args ...interface{})

func Info

func Info(args ...interface{})

func Infof

func Infof(format string, args ...interface{})

func SetLogger

func SetLogger(l Logger)

SetLogger will set the Logger instance that all Witness library code will use as logging output. The default is a SilentLogger that will output nothing.

func Warn

func Warn(args ...interface{})

func Warnf

func Warnf(format string, args ...interface{})

Types

type Logger

type Logger interface {
	Errorf(format string, args ...interface{})
	Error(args ...interface{})
	Warnf(format string, args ...interface{})
	Warn(args ...interface{})
	Debugf(format string, args ...interface{})
	Debug(args ...interface{})
	Infof(format string, args ...interface{})
	Info(args ...interface{})
}

Logger is used by witness library code to print out relevant information at runtime.

func GetLogger

func GetLogger() Logger

GetLogger returns the Logger instance currently being used by Witness library code.

type SilentLogger

type SilentLogger struct{}

SilentLogger is an implementation of the Logger interface that suppresses all logging output. This is the default logger when using Witness as a library, so that we don't interfere with the caller's stdout/stderr. Callers should supply their own Logger to capture Witness logging if desired.

func (SilentLogger) Debug

func (l SilentLogger) Debug(args ...interface{})

func (SilentLogger) Debugf

func (l SilentLogger) Debugf(format string, args ...interface{})

func (SilentLogger) Error

func (l SilentLogger) Error(args ...interface{})

func (SilentLogger) Errorf

func (l SilentLogger) Errorf(format string, args ...interface{})

func (SilentLogger) Info

func (l SilentLogger) Info(args ...interface{})

func (SilentLogger) Infof

func (l SilentLogger) Infof(format string, args ...interface{})

func (SilentLogger) Warn

func (l SilentLogger) Warn(args ...interface{})

func (SilentLogger) Warnf

func (l SilentLogger) Warnf(format string, args ...interface{})

Jump to

Keyboard shortcuts

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