handlers

package
v0.0.0-...-67463e6 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2015 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileHandler

type FileHandler struct {
	*glogger.StreamHandler
	FileName string
	// contains filtered or unexported fields
}

FileHandler struct

func NewFileHandler

func NewFileHandler() *FileHandler

NewFileHandler return a new FileHandler

func (*FileHandler) LoadConfig

func (fh *FileHandler) LoadConfig(config map[string]interface{}) error

LoadConfig load configuration from a map

func (*FileHandler) SetFileName

func (fh *FileHandler) SetFileName(fileName string)

SetFileName set the name of file to output

type RotatingFileHandler

type RotatingFileHandler struct {
	*glogger.GenericHandler
	FileName   string
	File       *os.File
	AutoRotate bool
	MaxSize    uint64
	MaxLine    uint64
	Daily      bool

	BackupCount int
	// contains filtered or unexported fields
}

RotatingFileHandler struct

func NewRotatingFileHandler

func NewRotatingFileHandler() *RotatingFileHandler

NewRotatingFileHandler return a new RotatingFileHandler

func (*RotatingFileHandler) Handle

func (fh *RotatingFileHandler) Handle(rec *glogger.Record)

Handle a record

func (*RotatingFileHandler) LoadConfig

func (fh *RotatingFileHandler) LoadConfig(config map[string]interface{}) error

LoadConfig load configuration from a map

type SMTPHandler

type SMTPHandler struct {
	*glogger.GenericHandler
	Address  string
	Username string
	Password string
	To       []string
	Subject  string
}

SMTPHandler struct

func NewSMTPHandler

func NewSMTPHandler() *SMTPHandler

NewSMTPHandler return a new SmtpHandler

func (*SMTPHandler) Handle

func (sh *SMTPHandler) Handle(rec *glogger.Record)

Handle a record

func (*SMTPHandler) LoadConfig

func (sh *SMTPHandler) LoadConfig(config map[string]interface{}) error

LoadConfig load configuration from a map

Jump to

Keyboard shortcuts

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