log

package
v0.0.0-...-51c1140 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Audit

func Audit(format string, a ...interface{})

func Auditing

func Auditing() bool

func Debugf

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

func Errorf

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

func Healthf

func Healthf(format string, a ...interface{})

func Infof

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

func Init

func Init(level Level, location string) error

func InitAudit

func InitAudit(location string) error

func SetLevel

func SetLevel(level Level)

SetLevel sets the current log level. It is safe to call this function from multiple goroutines.

func StackTrace

func StackTrace() []byte

StackTrace formats a stack trace of the calling goroutine.

func Warnf

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

Types

type Level

type Level int32
const (
	LogAlways Level = iota
	LogError
	LogWarning
	LogInfo
	LogHealthCheck
	LogDebug
)

func (*Level) Set

func (level *Level) Set(s string) error

Set implements the flag.Value.Set method. This allows the Level type to be parsed by the flag package.

func (Level) String

func (level Level) String() string

String returns the string representation of the Level. It's implemented to satisify the Stringer and flag.Value interfaces.

func (*Level) UnmarshalText

func (level *Level) UnmarshalText(text []byte) error

UnmarshalText implements the encoding.TextUnmarshaler interface. This allows the log level to be unmarshaled by the configuration parser.

Jump to

Keyboard shortcuts

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