Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Context ¶ added in v0.2.0
type Context struct { Data map[string]interface{} `json:"data,omitempty"` ReportLocation *ReportLocation `json:"reportLocation,omitempty"` HTTPRequest map[string]interface{} `json:"httpRequest,omitempty"` }
type Entry ¶ added in v0.2.0
type Entry struct { LogName string `json:"logName,omitempty"` Timestamp string `json:"timestamp,omitempty"` Severity severity `json:"severity,omitempty"` HTTPRequest *HttpRequest `json:"httpRequest,omitempty"` Trace string `json:"trace,omitempty"` ServiceContext *ServiceContext `json:"serviceContext,omitempty"` Message string `json:"message,omitempty"` Context *Context `json:"context,omitempty"` SourceLocation *ReportLocation `json:"sourceLocation,omitempty"` }
type Formatter ¶
Formatter implements Stackdriver formatting for logrus.
func NewFormatter ¶
NewFormatter returns a new Formatter.
type HttpRequest ¶ added in v0.2.0
type HttpRequest struct { RequestMethod string `json:"requestMethod,omitempty"` RequestUrl string `json:"requestUrl,omitempty"` RequestSize string `json:"requestSize,omitempty"` Status string `json:"status,omitempty"` ResponseSize string `json:"responseSize,omitempty"` UserAgent string `json:"userAgent,omitempty"` RemoteIp string `json:"remoteIp,omitempty"` ServerIp string `json:"serverIp,omitempty"` Referer string `json:"referer,omitempty"` Latency string `json:"latency,omitempty"` CacheLookup bool `json:"cacheLookup,omitempty"` CacheHit bool `json:"cacheHit,omitempty"` CacheValidatedWithOriginServer bool `json:"cacheValidatedWithOriginServer,omitempty"` CacheFillBytes string `json:"cacheFillBytes,omitempty"` Protocol string `json:"protocol,omitempty"` }
type Option ¶
type Option func(*Formatter)
Option lets you configure the Formatter.
func WithProjectID ¶ added in v0.2.1
func WithService ¶
WithService lets you configure the service name used for error reporting.
func WithStackSkip ¶
WithStackSkip lets you configure which packages should be skipped for locating the error.
func WithVersion ¶
WithVersion lets you configure the service version used for error reporting.
type ReportLocation ¶ added in v0.2.0
type ServiceContext ¶ added in v0.2.0
Click to show internal directories.
Click to hide internal directories.