logging

package
v0.0.0-...-f13d8c9 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	LogTimeFormat = "2006-01-02T15:04:05.000-07:00"
)

Functions

func Debugf

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

func Errorf

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

func Fatalf

func Fatalf(format string, v ...interface{})

func Infof

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

func IsEnabled

func IsEnabled(at LogLevel) bool

func RedactFormat

func RedactFormat(format string) string

func SetLogLevel

func SetLogLevel(to LogLevel)

func StackTrace

func StackTrace() string

func TagUD

func TagUD(arg interface{}) interface{}

log redaction related

func Tracef

func Tracef(format string, v ...interface{})

func Verbosef

func Verbosef(format string, v ...interface{})

func Warnf

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

Types

type LogLevel

type LogLevel int
const (
	Silent LogLevel = iota
	Fatal
	Error
	Warn
	Info
	Verbose
	Timing
	Debug
	Trace
)

public interface

func Level

func Level(s string) LogLevel

func (LogLevel) String

func (t LogLevel) String() string

implementation

type Logger

type Logger interface {
	// Warnings, logged by default.
	Warnf(format string, v ...interface{})
	// Errors, logged by default.
	Errorf(format string, v ...interface{})
	// Fatal errors. Will not terminate execution.
	Fatalf(format string, v ...interface{})
	// Informational messages.
	Infof(format string, v ...interface{})
	// Verbose messages like request logging
	Verbosef(format string, v ...interface{})
	// Get stack trace
	StackTrace() string
	// Debugging messages
	Debugf(format string, v ...interface{})
	// Program execution - most verbose
	Tracef(format string, v ...interface{})
}

Jump to

Keyboard shortcuts

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