Documentation
¶
Index ¶
- Constants
- type LogProcessor
- func (l *LogProcessor) Close() error
- func (l *LogProcessor) Listen()
- func (l *LogProcessor) PublishBlockEvent(blk *block.Block)
- func (l *LogProcessor) ReportError(bErr byte, err error)
- func (l *LogProcessor) Send(entry []byte) error
- func (l *LogProcessor) WithBlock(blk *block.Block) *log.Entry
- func (l *LogProcessor) WithError(err error) *log.Entry
- func (l *LogProcessor) WithTime(fields log.Fields) *log.Entry
Constants ¶
View Source
const ( // ErrWriter is the Error generated by problems with the writer ErrWriter byte = iota // ErrLog is the Error generated by problems with the Log ErrLog // ErrOther unexpected errors unrelated to logging or writer ErrOther )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LogProcessor ¶
type LogProcessor struct {
*log.Logger
EntryChan chan []byte
// contains filtered or unexported fields
}
LogProcessor is a TopicProcessor that intercepts messages on the gossip to create statistics and push the to the monitoring process It creates a new instance of logrus and writes on a io.Writer (preferrably UNIX sockets but any kind of connection will do)
func New ¶
func New(p eventbus.Broker, w io.WriteCloser, formatter log.Formatter) *LogProcessor
New creates a LogProcessor
func (*LogProcessor) Listen ¶ added in v0.2.0
func (l *LogProcessor) Listen()
Listen as specified in the TopicListener interface
func (*LogProcessor) PublishBlockEvent ¶
func (l *LogProcessor) PublishBlockEvent(blk *block.Block)
func (*LogProcessor) ReportError ¶
func (l *LogProcessor) ReportError(bErr byte, err error)
ReportError publishes an error on the MonitorTopic
func (*LogProcessor) Send ¶
func (l *LogProcessor) Send(entry []byte) error
Send specifies the format and the writer for the log
Click to show internal directories.
Click to hide internal directories.