Versions in this module Expand all Collapse all v1 v1.0.0 Mar 3, 2017 Changes in this version + var DefaultFormat string = `` + var ErrBackendIdIsEmpty error = errors.New(`Backend id is empty`) + var ErrBackendIsNull error = errors.New(`Passed object is null`) + var ErrBackendNotFound error = errors.New(`Backend not found`) + var LogError func(args ...interface{}) + var MapTypeName = map[Type]BackendName + type Backend struct + func NewBackendConsole(f *os.File) (ret *Backend) + func NewBackendFile(f *os.File) (ret *Backend) + func NewBackendGraylog2(gelf *g.GelfClient) (ret *Backend) + func NewBackendMemorypipe() (ret *Backend) + func NewBackendSyslog(hn string) (ret *Backend) + func NewBackendTelegram() (ret *Backend) + func (self *Backend) SetFormat(format string) *Backend + func (self *Backend) SetLevel(level l.Level) *Backend + func (self *Backend) SetMode(mode Mode) *Backend + func (self *Backend) SetModeNormal() *Backend + func (self *Backend) SetSelectLevels(levels ...l.Level) *Backend + func (self *Backend) Stop() (err error) + type BackendName string + const NAME_CONSOLE + const NAME_FILE + const NAME_GRAYLOG2 + const NAME_MEMORYPIPE + const NAME_SYSLOG + const NAME_TELEGRAM + func CheckMode(m BackendName) BackendName + type Backends struct + Pool *list.List + PoolIndex map[u.UUID]*list.Element + RecordsChan chan *m.Message + func NewBackends() (ret *Backends) + func (self *Backends) AddBackend(item *Backend) (ret *u.UUID, err error) + func (self *Backends) Close() + func (self *Backends) DelBackend(id *u.UUID) (err error) + func (self *Backends) Push(msg *m.Message) + type FnReader func(v *m.Message) + type Mode int8 + const MODE_NORMAL + const MODE_SELECT + type Type int + const BACKEND_CONSOLE + const BACKEND_FILE + const BACKEND_GRAYLOG2 + const BACKEND_MEMORYPIPE + const BACKEND_SYSLOG + const BACKEND_TELEGRAM