Documentation ¶
Index ¶
- func MakeDefaultStacktrace(offset int) string
- func MakeStacktrace(offset int, filter StacktraceFilter, formatter StacktraceFormatter) string
- func NewProductionEncoderConfig() zapcore.EncoderConfig
- type Caller
- type Config
- type FieldErrorContext
- type FieldHttpRequest
- type FieldReportLocation
- type FieldServiceContext
- type FieldSourceLocation
- type FieldSourceReference
- type FieldStacktrace
- type Logger
- func (l *Logger) CallerSkipOffset() int
- func (l *Logger) DPanic(args ...interface{})
- func (l *Logger) DPanicf(template string, args ...interface{})
- func (l *Logger) DPanicw(msg string, keysAndValues ...interface{})
- func (l *Logger) Debug(args ...interface{})
- func (l *Logger) Debugf(template string, args ...interface{})
- func (l *Logger) Debugw(msg string, keysAndValues ...interface{})
- func (l *Logger) Error(args ...interface{})
- func (l *Logger) Errorf(template string, args ...interface{})
- func (l *Logger) Errorw(msg string, keysAndValues ...interface{})
- func (l *Logger) Fatal(args ...interface{})
- func (l *Logger) Fatalf(template string, args ...interface{})
- func (l *Logger) Fatalw(msg string, keysAndValues ...interface{})
- func (l *Logger) Info(args ...interface{})
- func (l *Logger) Infof(template string, args ...interface{})
- func (l *Logger) Infow(msg string, keysAndValues ...interface{})
- func (l *Logger) Panic(args ...interface{})
- func (l *Logger) Panicf(template string, args ...interface{})
- func (l *Logger) Panicw(msg string, keysAndValues ...interface{})
- func (l *Logger) SetResponseStatusCode(statusCode int)
- func (l *Logger) StdLogger() *log.Logger
- func (l *Logger) With(args ...interface{}) *Logger
- func (l *Logger) WithCallerSkipOffset(offset int) *Logger
- func (l *Logger) WithRequest(request *http.Request) *Logger
- func (l *Logger) WithUser(user string) *Logger
- type StacktraceDefaultFilter
- type StacktraceDefaultFormatter
- func (f *StacktraceDefaultFormatter) BeginFormatting(writer bufferWriter)
- func (f *StacktraceDefaultFormatter) EndFormatting(writer bufferWriter, lastIndex int)
- func (f *StacktraceDefaultFormatter) FormatFrame(writer bufferWriter, frame runtime.Frame, index int)
- func (f *StacktraceDefaultFormatter) JoinFrames(writer bufferWriter, firstIndex int, secondIndex int)
- type StacktraceFilter
- type StacktraceFormatter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MakeDefaultStacktrace ¶
func MakeStacktrace ¶
func MakeStacktrace(offset int, filter StacktraceFilter, formatter StacktraceFormatter) string
func NewProductionEncoderConfig ¶
func NewProductionEncoderConfig() zapcore.EncoderConfig
Types ¶
type FieldErrorContext ¶
type FieldErrorContext struct { HttpRequest *FieldHttpRequest User string ReportLocation FieldReportLocation SourceReferences []FieldSourceReference }
func (FieldErrorContext) MarshalLogObject ¶
func (c FieldErrorContext) MarshalLogObject(enc zapcore.ObjectEncoder) error
https://cloud.google.com/error-reporting/reference/rest/v1beta1/ErrorContext#SourceLocation
type FieldHttpRequest ¶
func (FieldHttpRequest) MarshalLogObject ¶
func (r FieldHttpRequest) MarshalLogObject(enc zapcore.ObjectEncoder) error
type FieldReportLocation ¶
type FieldReportLocation struct {
Caller
}
func (FieldReportLocation) MarshalLogObject ¶
func (f FieldReportLocation) MarshalLogObject(enc zapcore.ObjectEncoder) error
https://cloud.google.com/error-reporting/reference/rest/v1beta1/ErrorContext#SourceLocation
type FieldServiceContext ¶
func (FieldServiceContext) MarshalLogObject ¶
func (s FieldServiceContext) MarshalLogObject(enc zapcore.ObjectEncoder) error
type FieldSourceLocation ¶
type FieldSourceLocation struct {
Caller
}
func (FieldSourceLocation) MarshalLogObject ¶
func (f FieldSourceLocation) MarshalLogObject(enc zapcore.ObjectEncoder) error
https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry#LogEntrySourceLocation
type FieldSourceReference ¶
func (FieldSourceReference) MarshalLogObject ¶
func (f FieldSourceReference) MarshalLogObject(enc zapcore.ObjectEncoder) error
https://cloud.google.com/error-reporting/reference/rest/v1beta1/ErrorContext#SourceLocation
type FieldStacktrace ¶
type FieldStacktrace struct {
// contains filtered or unexported fields
}
func (*FieldStacktrace) Format ¶
func (f *FieldStacktrace) Format()
type Logger ¶
type Logger struct { *zap.SugaredLogger // contains filtered or unexported fields }
func NewLogger ¶
func NewLogger( serviceContext FieldServiceContext, sourceReferences []FieldSourceReference, options ...zap.Option, ) (*Logger, error)
func (*Logger) CallerSkipOffset ¶
func (*Logger) SetResponseStatusCode ¶
func (*Logger) WithCallerSkipOffset ¶
type StacktraceDefaultFilter ¶
type StacktraceDefaultFilter struct{}
func (*StacktraceDefaultFilter) ShouldSkip ¶
func (f *StacktraceDefaultFilter) ShouldSkip(runtime.Frame) bool
type StacktraceDefaultFormatter ¶
type StacktraceDefaultFormatter struct{}
func (*StacktraceDefaultFormatter) BeginFormatting ¶
func (f *StacktraceDefaultFormatter) BeginFormatting(writer bufferWriter)
func (*StacktraceDefaultFormatter) EndFormatting ¶
func (f *StacktraceDefaultFormatter) EndFormatting(writer bufferWriter, lastIndex int)
func (*StacktraceDefaultFormatter) FormatFrame ¶
func (f *StacktraceDefaultFormatter) FormatFrame(writer bufferWriter, frame runtime.Frame, index int)
func (*StacktraceDefaultFormatter) JoinFrames ¶
func (f *StacktraceDefaultFormatter) JoinFrames(writer bufferWriter, firstIndex int, secondIndex int)
type StacktraceFilter ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.