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