Documentation ¶
Overview ¶
Package logs provides a simple API for sending app logs from STDOUT and STDERR through the dropsonde system.
Use ¶
See the documentation for package dropsonde for configuration details.
Importing package dropsonde and initializing will initial this package. To send logs use
logs.SendAppLog(appID, message, sourceType, sourceInstance)
for sending errors,
logs.SendAppErrorLog(appID, message, sourceType, sourceInstance)
Index ¶
- func Initialize(ls log_sender.LogSender)
- func ScanErrorLogStream(appID, sourceType, sourceInstance string, reader io.Reader)
- func ScanLogStream(appID, sourceType, sourceInstance string, reader io.Reader)
- func SendAppErrorLog(appID, message, sourceType, sourceInstance string) error
- func SendAppLog(appID, message, sourceType, sourceInstance string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Initialize ¶
func Initialize(ls log_sender.LogSender)
Initialize prepares the logs package for use with the automatic Emitter from dropsonde.
func 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 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 SendAppErrorLog ¶
SendAppErrorLog sends a log error message with the given appid, log message, source type and source instance, with a message type of std err. Returns an error if one occurs while sending the event.
func SendAppLog ¶
SendAppLog sends a log message with the given appid, log message, source type and source instance, with a message type of std out. Returns an error if one occurs while sending the event.
Types ¶
This section is empty.