Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Console ¶
type Console struct{}
Console stock
func NewConsole ¶ added in v1.0.8
NewConsole Allocates memory
type Context ¶
type Context struct {
ReportLocation *ReportLocation `json:"reportLocation,omitempty"`
}
Context is required by the Stackdriver Error format
type Logger ¶
type Logger interface { Infof(message string, args ...interface{}) Debugf(message string, args ...interface{}) Errorf(message string, args ...interface{}) Criticalf(message string, args ...interface{}) }
Logger interface, console, syslog or stackdriver format
type ReportLocation ¶
type ReportLocation struct { FilePath string `json:"filePath"` FunctionName string `json:"functionName"` LineNumber int `json:"lineNumber"` }
ReportLocation is required by the Stackdriver Error format
type ServiceContext ¶
type ServiceContext struct { Service string `json:"service,omitempty"` Version string `json:"version,omitempty"` }
ServiceContext is required by the Stackdriver Error format.
type Stackdriver ¶
type Stackdriver struct { Severity string `json:"severity"` EventTime string `json:"eventTime"` Message string `json:"message"` ServiceContext *ServiceContext `json:"serviceContext,omitempty"` Context *Context `json:"context,omitempty"` Stacktrace string `json:"stacktrace,omitempty"` }
Stackdriver format, see cloud.google.com/error-reporting/docs/formatting-error-messages#formatting_requirements
func NewStackdriver ¶ added in v1.0.8
func NewStackdriver(daemon, version string) (*Stackdriver, error)
NewStackdriver allocates memory
func (*Stackdriver) Criticalf ¶
func (s *Stackdriver) Criticalf(format string, args ...interface{})
Criticalf is system failure
func (*Stackdriver) Debugf ¶
func (s *Stackdriver) Debugf(format string, args ...interface{})
Debugf logs a message with DEBUG severity level
func (*Stackdriver) Errorf ¶
func (s *Stackdriver) Errorf(format string, args ...interface{})
Errorf prints out a message with ERROR severity level + picked up by stackdriver error reporting
func (*Stackdriver) Infof ¶
func (s *Stackdriver) Infof(format string, args ...interface{})
Infof logs a message with INFO severity level
type Syslog ¶
Syslog contains writer connection to a syslog server