Documentation
¶
Index ¶
- type EventEmitter
- type LogChainer
- type LogSender
- func (l *LogSender) LogMessage(message []byte, msgType events.LogMessage_MessageType) LogChainer
- func (l *LogSender) ScanErrorLogStream(appID, sourceType, sourceInstance string, reader io.Reader)
- func (l *LogSender) ScanLogStream(appID, sourceType, sourceInstance string, reader io.Reader)
- func (l *LogSender) SendAppErrorLog(appID, message, sourceType, sourceInstance string) error
- func (l *LogSender) SendAppLog(appID, message, sourceType, sourceInstance string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EventEmitter ¶
type LogChainer ¶
type LogChainer interface { SetTimestamp(t int64) LogChainer SetTag(key, value string) LogChainer SetAppId(id string) LogChainer SetSourceType(s string) LogChainer SetSourceInstance(s string) LogChainer Send() error }
type LogSender ¶
type LogSender struct {
// contains filtered or unexported fields
}
A LogSender emits log events.
func NewLogSender ¶
func NewLogSender(eventEmitter EventEmitter) *LogSender
NewLogSender instantiates a LogSender with the given EventEmitter.
func (*LogSender) LogMessage ¶
func (l *LogSender) LogMessage(message []byte, msgType events.LogMessage_MessageType) LogChainer
LogMessage creates a log message that can be manipulated via cascading calls and then sent.
func (*LogSender) ScanErrorLogStream ¶
ScanErrorLogStream sends a log error message with the given meta-data for each line from reader. Restarts on read errors and continues until EOF.
func (*LogSender) ScanLogStream ¶
ScanLogStream sends a log message with the given meta-data for each line from reader. Restarts on read errors and continues until EOF.
func (*LogSender) SendAppErrorLog ¶
SendAppErrorLog sends a log error message with the given appid and log message with a message type of std err. Returns an error if one occurs while sending the event.
func (*LogSender) SendAppLog ¶
SendAppLog sends a log message with the given appid and log message with a message type of std out. Returns an error if one occurs while sending the event.