Documentation ¶
Overview ¶
Package loggee is logging wrapper interface that allows share packages to call logging services without the calling application being tide to a specific implementation.
Index ¶
- func Activity(ctx context.Context, fn ActivityFunc) error
- func BindMultiErrorFormatting(err error) error
- func Debug(msg string)
- func Debugf(fmt string, args ...interface{})
- func Error(msg string)
- func Errorf(fmt string, args ...interface{})
- func Fatal(msg string)
- func Fatalf(fmt string, args ...interface{})
- func Info(msg string)
- func Infof(fmt string, args ...interface{})
- func SetLogger(logger Logger)
- func SetMultiErrorFormatting(f func([]error) string)
- func Warn(msg string)
- func Warnf(fmt string, args ...interface{})
- type ActivityFunc
- type Entry
- type Fielder
- type Fields
- type Level
- type Logger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Activity ¶
func Activity(ctx context.Context, fn ActivityFunc) error
Activity log within th context of the activity.
func BindMultiErrorFormatting ¶ added in v0.2.1
BindMultiErrorFormatting is a helper function to attach a standard formatter to opt in hashicorp/go-multierror errors.
func Fatalf ¶
func Fatalf(fmt string, args ...interface{})
Fatalf writes a formated fatal message and exits.
func SetMultiErrorFormatting ¶ added in v0.2.1
SetMultiErrorFormatting allows the multiple error formatting to be globally set.
Types ¶
type ActivityFunc ¶
ActivityFunc is the call back function signature for an activity Activities allow logging context to be added to output.
type Entry ¶
type Entry interface { WithFields(Fielder) Entry WithField(string, interface{}) Entry WithDuration(time.Duration) Entry WithError(error) Entry Debug(string) Info(string) Warn(string) Error(string) Fatal(string) Debugf(string, ...interface{}) Infof(string, ...interface{}) Warnf(string, ...interface{}) Errorf(string, ...interface{}) Fatalf(string, ...interface{}) }
Entry is a wrapper interface for a slog entry.
type Fielder ¶
type Fielder interface {
Fields() Fields
}
Fielder is an interface for providing fields to custom types.
type Fields ¶
type Fields map[string]interface{}
Fields represents a map of entry level data used for structured logging.
Directories ¶
Path | Synopsis |
---|---|
Package apexlog implements an apex logger wrapper for loggee.Logger
|
Package apexlog implements an apex logger wrapper for loggee.Logger |
Package stdlog implements a loggee wrapper around the standard log package
|
Package stdlog implements a loggee wrapper around the standard log package |