Documentation ¶
Overview ¶
Package logentries is a drop in solution for integrating logentries into your app. Implements the **io.Writer** interface so it will easily forward anything logged from the **log** package will show up in logentries.
Uses channels and buffered goroutines so it's non blocking for most use.
Author: Colin Edwards
Example
logentriesWriter := logentries.New("XXXX-XXXXXXX-XXXXX-XXX") //Token here defer logentriesWriter.Close() multiWriter := io.MultiWriter(os.Stderr, logentriesWriter) log.SetOutput(multiWriter) log.Print("test")
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Logentries ¶
type Logentries struct {
// contains filtered or unexported fields
}
func (*Logentries) Close ¶
func (l *Logentries) Close()
Clean up the logger and send any remaining messages
func (*Logentries) Port ¶
func (l *Logentries) Port(port int)
Set the port to send data to Logentries on
Valid ports: 80, 514, 10000, 20000
20000 automatically enables SSL
func (*Logentries) UseSSL ¶
func (l *Logentries) UseSSL(useSSL bool)
Use SSL when sending data to Logentries
Sets port to 20000
type ServiceNameLogger ¶
type ServiceNameLogger struct {
// contains filtered or unexported fields
}
func NewServiceNameLogger ¶
func NewServiceNameLogger(serviceName string, writer io.Writer) (l *ServiceNameLogger)
Click to show internal directories.
Click to hide internal directories.