logrus_mail: github.com/zbindenren/logrus_mail Index | Files

package logrus_mail

import "github.com/zbindenren/logrus_mail"

Index

Package Files

mail.go

type MailAuthHook Uses

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 Uses

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 Uses

func (hook *MailAuthHook) Fire(entry *logrus.Entry) error

Fire is called when a log event is fired.

func (*MailAuthHook) Levels Uses

func (hook *MailAuthHook) Levels() []logrus.Level

Levels returns the available logging levels.

type MailHook Uses

type MailHook struct {
    AppName string
    // contains filtered or unexported fields
}

MailHook to sends logs by email without authentication.

func NewMailHook Uses

func NewMailHook(appname string, host string, port int, from string, to string) (*MailHook, error)

NewMailHook creates a hook to be added to an instance of logger.

func (*MailHook) Fire Uses

func (hook *MailHook) Fire(entry *logrus.Entry) error

Fire is called when a log event is fired.

func (*MailHook) Levels Uses

func (hook *MailHook) Levels() []logrus.Level

Levels returns the available logging levels.

Package logrus_mail imports 9 packages (graph) and is imported by 6 packages. Updated 2017-09-06. Refresh now. Tools for package owners.