Documentation ¶
Index ¶
- func New(c Config, p *nsq.Producer, f loggers.Logger, e encoder.Encoder) loggers.Logger
- type Config
- type Level
- type Message
- type Nsq
- func (l *Nsq) Debug(xs ...interface{})
- func (l *Nsq) Debugf(s string, xs ...interface{})
- func (l *Nsq) Error(xs ...interface{})
- func (l *Nsq) Errorf(s string, xs ...interface{})
- func (l *Nsq) Fatal(xs ...interface{})
- func (l *Nsq) Fatalf(s string, xs ...interface{})
- func (l *Nsq) Level() interface{}
- func (l *Nsq) Print(xs ...interface{})
- func (l *Nsq) Printf(s string, xs ...interface{})
- func (l *Nsq) Write(buf []byte) (int, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { Level Level `validate:"required" default:"info"` Topic string `validate:"required" default:"info"` }
Config configuration for logger.
type Message ¶
type Message struct { Level string Payload interface{} }
Message is a logger message data.
func NewMessage ¶
NewMessage creates new Message with logging level as string and payload in original type.
Click to show internal directories.
Click to hide internal directories.