Documentation ¶
Index ¶
- func NewConsole(l zerolog.Level) zerolog.LevelWriter
- func NewFileWriter(w *rotatefile.Writer, lv zerolog.Level) zerolog.LevelWriter
- func NewSmtpWriter(username, password, host, subject string, sendto []string, level zerolog.Level) zerolog.LevelWriter
- type Brush
- type ConsoleWriter
- type FileLogWriter
- type SmtpWriter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewConsole ¶
func NewConsole(l zerolog.Level) zerolog.LevelWriter
create ConsoleWriter returning as LoggerInterface.
func NewFileWriter ¶
func NewFileWriter(w *rotatefile.Writer, lv zerolog.Level) zerolog.LevelWriter
NewFileWriter NewFileWriter
func NewSmtpWriter ¶
func NewSmtpWriter(username, password, host, subject string, sendto []string, level zerolog.Level) zerolog.LevelWriter
create smtp writer.
Types ¶
type ConsoleWriter ¶
ConsoleWriter implements LoggerInterface and writes messages to terminal.
func (*ConsoleWriter) WriteLevel ¶
type FileLogWriter ¶
type FileLogWriter struct { Level zerolog.Level `json:"level"` // contains filtered or unexported fields }
FileLogWriter implements LevelWriter.
func (*FileLogWriter) Write ¶
func (w *FileLogWriter) Write(p []byte) (n int, err error)
WriteLevel implements io.Writer.
func (*FileLogWriter) WriteLevel ¶
WriteLevel implements LevelWriter.
type SmtpWriter ¶
type SmtpWriter struct { Username string `json:"Username"` Password string `json:"password"` Host string `json:"Host"` Subject string `json:"subject"` RecipientAddresses []string `json:"sendTos"` Level zerolog.Level `json:"level"` // contains filtered or unexported fields }
smtpWriter implements LoggerInterface and is used to send emails via given SMTP-server.
func (*SmtpWriter) WriteLevel ¶
write message in smtp writer. it will send an email with subject and only this message.
Click to show internal directories.
Click to hide internal directories.