logging

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2024 License: MIT Imports: 1 Imported by: 32

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetLogging

func SetLogging(logger LoggingInterface)

Sets a custom logging implementation By default NoLogging is used, so no logs are printed This is used by service.SetLogging()

Types

type LoggingInterface

type LoggingInterface interface {
	Trace(args ...interface{})
	Tracef(format string, args ...interface{})
	Debug(args ...interface{})
	Debugf(format string, args ...interface{})
	Info(args ...interface{})
	Infof(format string, args ...interface{})
	Error(args ...interface{})
	Errorf(format string, args ...interface{})
}

LoggingInterface needs to be implemented, if the internal logs should be printed

func Log

func Log() LoggingInterface

type NoLogging

type NoLogging struct{}

NoLogging is an empty implementation of Logging which does nothing.

func (*NoLogging) Debug

func (l *NoLogging) Debug(args ...interface{})

func (*NoLogging) Debugf

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

func (*NoLogging) Error

func (l *NoLogging) Error(args ...interface{})

func (*NoLogging) Errorf

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

func (*NoLogging) Info

func (l *NoLogging) Info(args ...interface{})

func (*NoLogging) Infof

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

func (*NoLogging) Trace

func (l *NoLogging) Trace(args ...interface{})

func (*NoLogging) Tracef

func (l *NoLogging) Tracef(format string, args ...interface{})

Jump to

Keyboard shortcuts

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