Documentation ¶
Index ¶
Constants ¶
View Source
const ( // ContentTypeJSON is a Content-Type header for json formatted logs ContentTypeJSON = "application/json" // ContentTypeGzipJSON is a Content-Type header for gzipped json formatted logs ContentTypeGzipJSON = "application/gzip" // HeaderLicenseKey is for use with new relic license key HeaderLicenseKey = "X-License-Key" // HeaderInsertKey is for use with new relic insert api key HeaderInsertKey = "Api-Key" // USLogsEndpoint is the new relic logs endpoint for US users USLogsEndpoint = "https://log-api.newrelic.com/log/v1" // EULogsEndpoint is the new relig logs endpoint for EU users EULogsEndpoint = "https://log-api.eu.newrelic.com/log/v1" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApacheLogRecord ¶
type ApacheLogRecord struct { *LogRecord IP string Time time.Time Method, URI, Protocol string ElapsedTime time.Duration }
ApacheLogRecord is a complex log format to match the apache request logs
func (*ApacheLogRecord) Log ¶
func (r *ApacheLogRecord) Log(out io.Writer)
type ConnectLogRecord ¶
ConnectLogRecord is a simpler log format to record server connections
func (*ConnectLogRecord) Log ¶
func (c *ConnectLogRecord) Log(out io.Writer)
type LogRecord ¶
type LogRecord struct { http.ResponseWriter ResponseBytes int64 Status int ContentType string }
func (*LogRecord) WriteHeader ¶
type NRLogProcessor ¶
type NRLogProcessor struct {
// contains filtered or unexported fields
}
NRLogProcessor sends logs to new relic log api. Impliments io.Writer
func NewEUNRLogProcessorWithInsertKey ¶
func NewEUNRLogProcessorWithInsertKey(key string) NRLogProcessor
NewEUNRLogProcessorWithInsertKey returns NRLogProcessor to send logs to new relic logs api
func NewEUNRLogProcessorWithLicenseKey ¶
func NewEUNRLogProcessorWithLicenseKey(key string) NRLogProcessor
NewEUNRLogProcessorWithLicenseKey returns NRLogProcessor to send logs to new relic logs api
Click to show internal directories.
Click to hide internal directories.