loggers

package module
v0.0.0-...-aa525fc Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 11, 2015 License: MIT Imports: 10 Imported by: 0

README

Go Walker

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMailcatcherWriter

func NewMailcatcherWriter() LoggerInterface

func NewSesWriter

func NewSesWriter() LoggerInterface

Types

type MailcatcherWriter

type MailcatcherWriter struct {
	Host               string   `json:"Host"`
	Subject            string   `json:"subject"`
	FromAddress        string   `json:"fromAddress"`
	RecipientAddresses []string `json:"sendTos"`
	Level              int      `json:"level"`
	Tls                bool     `json:"tls"`
}

func (*MailcatcherWriter) Destroy

func (s *MailcatcherWriter) Destroy()

func (*MailcatcherWriter) Flush

func (s *MailcatcherWriter) Flush()

func (*MailcatcherWriter) Init

func (s *MailcatcherWriter) Init(jsonconfig string) error

config like:

{
	"host":"127.0.0.1:1025",
	"subject":"email title",
	"fromAddress":"from@example.com",
	"sendTos":["email1","email2"],
	"level":LevelError,
	"tls":false
}

func (*MailcatcherWriter) WriteMsg

func (s *MailcatcherWriter) WriteMsg(msg string, level int) error

type SesWriter

type SesWriter struct {
	Name               string   `json:"name"`
	Endpoint           string   `json:"endpoint"`
	AccessKey          string   `json:"accesskey"`
	SecretKey          string   `json:"secretkey"`
	Subject            string   `json:"subject"`
	FromAddress        string   `json:"fromAddress"`
	RecipientAddresses []string `json:"sendTos"`
	Level              int      `json:"level"`
}

func (*SesWriter) Destroy

func (s *SesWriter) Destroy()

func (*SesWriter) Flush

func (s *SesWriter) Flush()

func (*SesWriter) Init

func (s *SesWriter) Init(jsonconfig string) error

config like:

{
	"accesskey":"aws access key",
	"secretkey":"aws secret key",
	"name":"us-east-1",
	"endpoint":"https://email.us-east-1.amazonaws.com",
	"subject":"email title",
	"fromAddress":"from@example.com",
	"sendTos":["email1","email2"],
	"level":LevelError
}

func (*SesWriter) WriteMsg

func (s *SesWriter) WriteMsg(msg string, level int) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL