Documentation ¶
Index ¶
- Constants
- func BindRoutes(l *DepLog, profile uint64, levels map[uint64]uint64)
- func SetupDefaultRoutes(l *DepLog)
- type ArgsCriter
- type ArgsCriticaler
- type ArgsCriticer
- type ArgsDebugger
- type ArgsErrorer
- type ArgsInfoer
- type ArgsNoticer
- type ArgsWarner
- type ArgsWarninger
- type Criter
- type Criticaler
- type Criticer
- type Debugger
- type DepLog
- func (l *DepLog) Crit(message string)
- func (l *DepLog) Critf(format string, args ...interface{})
- func (l *DepLog) Debug(message string)
- func (l *DepLog) Debugf(format string, args ...interface{})
- func (l *DepLog) Error(message string)
- func (l *DepLog) Errorf(format string, args ...interface{})
- func (l *DepLog) Info(message string)
- func (l *DepLog) Infof(format string, args ...interface{})
- func (l *DepLog) Route(loggerProfile uint64, depLogMethods uint64, injectedMethod uint64) *DepLog
- func (l *DepLog) Warn(message string)
- func (l *DepLog) Warnf(format string, args ...interface{})
- type Errorer
- type FormatCriter
- type FormatCriticaler
- type FormatCriticer
- type FormatDebugger
- type FormatErrorer
- type FormatInfoer
- type FormatNoticer
- type FormatWarner
- type FormatWarninger
- type Infoer
- type Logger
- type Noticer
- type Warner
- type Warninger
Constants ¶
const ( FlagDebug uint64 = 1 << iota FlagDebuga FlagDebugf FlagInfo FlagInfoa FlagInfof FlagWarning FlagWarninga FlagWarningf FlagWarn FlagWarna FlagWarnf FlagError FlagErrora FlagErrorf FlagCritical FlagCriticala FlagCriticalf FlagCritic FlagCritica FlagCriticf FlagCrit FlagCrita FlagCritf FlagPrint FlagPrinta FlagPrintf FlagNotice FlagNoticea FlagNoticef )
const (
ProfileLogrus uint64 = 0
)
Variables ¶
This section is empty.
Functions ¶
func BindRoutes ¶
BindRoutes will bind the existing logger methods in the injected logger with the given map. This map tells which of the DepLog methods should be routed to which injected logger methods, or ignore if they don't exist. see SetupDefaultRoutes(...) as an example
func SetupDefaultRoutes ¶
func SetupDefaultRoutes(l *DepLog)
SetupDefaultRoutes confiure the DepLog to only use logger methods that exists in the injected logger. If they do not exist, logging is ignored.
Types ¶
type ArgsCriter ¶
type ArgsCriter interface {
Crit(args ...interface{})
}
type ArgsCriticaler ¶
type ArgsCriticaler interface {
Critical(args ...interface{})
}
type ArgsCriticer ¶
type ArgsCriticer interface {
Critic(args ...interface{})
}
type ArgsDebugger ¶
type ArgsDebugger interface {
Debug(args ...interface{})
}
type ArgsErrorer ¶
type ArgsErrorer interface {
Error(args ...interface{})
}
type ArgsInfoer ¶
type ArgsInfoer interface {
Info(args ...interface{})
}
type ArgsNoticer ¶
type ArgsNoticer interface {
Notice(args ...interface{})
}
type ArgsWarner ¶
type ArgsWarner interface {
Warn(args ...interface{})
}
type ArgsWarninger ¶
type ArgsWarninger interface {
Warning(args ...interface{})
}
type Criticaler ¶
type Criticaler interface {
Critical(message string)
}
type DepLog ¶
type DepLog struct {
// contains filtered or unexported fields
}
func (*DepLog) Route ¶
Route overwrites existing default routes for s specific logger type such as logrus eg. DepLog.Route(profileLogrus, FlagDebugf, FlagFatalf) will bind the DepLog.Debugf to injected.Fatalf, if the injected logger has the matching profile
Yes, another injected logger migth have the same profile as logrus, in that case the routes will still take affect. This only cares about the profile, not the GoLang type
type FormatCriter ¶
type FormatCriter interface {
Critf(format string, args ...interface{})
}
type FormatCriticaler ¶
type FormatCriticaler interface {
Criticalf(format string, args ...interface{})
}
type FormatCriticer ¶
type FormatCriticer interface {
Criticf(format string, args ...interface{})
}
type FormatDebugger ¶
type FormatDebugger interface {
Debugf(format string, args ...interface{})
}
type FormatErrorer ¶
type FormatErrorer interface {
Errorf(format string, args ...interface{})
}
type FormatInfoer ¶
type FormatInfoer interface {
Infof(format string, args ...interface{})
}
type FormatNoticer ¶
type FormatNoticer interface {
Noticef(format string, args ...interface{})
}
type FormatWarner ¶
type FormatWarner interface {
Warnf(format string, args ...interface{})
}
type FormatWarninger ¶
type FormatWarninger interface {
Warningf(format string, args ...interface{})
}
type Logger ¶
type Logger interface { Info(message string) Infof(format string, args ...interface{}) Warn(message string) Warnf(format string, args ...interface{}) Debug(message string) Debugf(format string, args ...interface{}) Error(message string) Errorf(message string, args ...interface{}) Crit(message string) Critf(message string, args ...interface{}) }