Documentation
¶
Index ¶
Constants ¶
View Source
const (
Service = "service"
)
Variables ¶
View Source
var FxEventLogger = func(log *Logger) fxevent.Logger {
return log
}
View Source
var FxLoggerModule = fx.Module("logger", fx.Provide( NewDefaultLoggerFactory, NewFxLogger, fx.Annotate( fxloggertest.GetTestLogBufferInstance, fx.ResultTags(`name:"test-log-buffer"`), ), ), )
Functions ¶
func FetchLogLevel ¶
Types ¶
type DefaultLoggerFactory ¶
type DefaultLoggerFactory struct{}
func (*DefaultLoggerFactory) Create ¶
func (f *DefaultLoggerFactory) Create(options ...LoggerOption) (*Logger, error)
type FxLoggerParam ¶
type FxLoggerParam struct { fx.In Factory LoggerFactory Config *fxconfig.Config }
type Logger ¶
func FromZerolog ¶
func NewFxLogger ¶
func NewFxLogger(p FxLoggerParam) (*Logger, error)
type LoggerFactory ¶
type LoggerFactory interface {
Create(options ...LoggerOption) (*Logger, error)
}
func NewDefaultLoggerFactory ¶
func NewDefaultLoggerFactory() LoggerFactory
type LoggerOption ¶
type LoggerOption func(o *options)
func WithLevel ¶
func WithLevel(l zerolog.Level) LoggerOption
func WithName ¶
func WithName(n string) LoggerOption
func WithOutputWriter ¶
func WithOutputWriter(w io.Writer) LoggerOption
Source Files
¶
Click to show internal directories.
Click to hide internal directories.