Documentation ¶
Index ¶
- Variables
- func AddScopedILogger(builder *di.Builder, implType reflect.Type)
- func AddScopedILoggerByFunc(builder *di.Builder, implType reflect.Type, ...)
- func AddSingletonILogger(builder *di.Builder, implType reflect.Type)
- func AddSingletonILoggerByFunc(builder *di.Builder, implType reflect.Type, ...)
- func AddSingletonILoggerByObj(builder *di.Builder, obj interface{})
- func AddTransientILogger(builder *di.Builder, implType reflect.Type)
- func AddTransientILoggerByFunc(builder *di.Builder, implType reflect.Type, ...)
- func RemoveAllILogger(builder *di.Builder)
- type ILogger
Constants ¶
This section is empty.
Variables ¶
View Source
var ReflectTypeILogger = di.GetInterfaceReflectType((*ILogger)(nil))
ReflectTypeILogger used when your service claims to implement ILogger
Functions ¶
func AddScopedILogger ¶
AddScopedILogger adds a type that implements ILogger
func AddScopedILoggerByFunc ¶
func AddScopedILoggerByFunc(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error))
AddScopedILoggerByFunc adds a type by a custom func
func AddSingletonILogger ¶
AddSingletonILogger adds a type that implements ILogger
func AddSingletonILoggerByFunc ¶
func AddSingletonILoggerByFunc(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error))
AddSingletonILoggerByFunc adds a type by a custom func
func AddSingletonILoggerByObj ¶
AddSingletonILoggerByObj adds a prebuilt obj
func AddTransientILogger ¶
AddTransientILogger adds a type that implements ILogger
func AddTransientILoggerByFunc ¶
func AddTransientILoggerByFunc(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error))
AddTransientILoggerByFunc adds a type by a custom func
func RemoveAllILogger ¶ added in v0.1.144
RemoveAllILogger removes all ILogger from the DI
Types ¶
type ILogger ¶
type ILogger interface { Error() *zerolog.Event Debug() *zerolog.Event Fatal() *zerolog.Event Info() *zerolog.Event Warn() *zerolog.Event Trace() *zerolog.Event GetLogger() *zerolog.Logger ErrorL(logger *zerolog.Logger) *zerolog.Event DebugL(logger *zerolog.Logger) *zerolog.Event FatalL(logger *zerolog.Logger) *zerolog.Event InfoL(logger *zerolog.Logger) *zerolog.Event WarnL(logger *zerolog.Logger) *zerolog.Event TraceL(logger *zerolog.Logger) *zerolog.Event }
ILogger interface
func GetILoggerFromContainer ¶
GetILoggerFromContainer alternative to SafeGetILoggerFromContainer but panics of object is not present
Click to show internal directories.
Click to hide internal directories.