Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GoMailAuthHook ¶
type GoMailAuthHook struct { AppName string Host string Port int From *mail.Address To *mail.Address Username string Password string // contains filtered or unexported fields }
MailAuthHook to sends logs by email with authentication.
func NewGoMailAuthHook ¶
func NewGoMailAuthHook(appname string, host string, port int, from string, to string, username string, password string) (*GoMailAuthHook, error)
NewMailAuthHook creates a hook to be added to an instance of logger.
func (*GoMailAuthHook) Fire ¶
func (hook *GoMailAuthHook) Fire(entry *logrus.Entry) error
Fire is called when a log event is fired.
func (*GoMailAuthHook) Levels ¶
func (hook *GoMailAuthHook) Levels() []logrus.Level
Levels returns the available logging levels.
func (*GoMailAuthHook) SetLevels ¶
func (hook *GoMailAuthHook) SetLevels(levels []logrus.Level)
Levels returns the available logging levels.
Click to show internal directories.
Click to hide internal directories.