Documentation ¶
Index ¶
- func CloudContextMiddleware(h http.Handler) http.Handler
- func HTTPLogParamsMiddleware(h http.Handler) http.Handler
- func Params(ctx context.Context) map[string]interface{}
- func SetParam(ctx context.Context, key, value string) context.Context
- func Trace(ctx context.Context) string
- func WithParams(ctx context.Context, params map[string]string) context.Context
- func WithTrace(ctx context.Context, r *http.Request) context.Context
- type ColourLogger
- type ContextParamLogger
- type Entry
- type StackDriverLogger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ColourLogger ¶
func (ColourLogger) Flush ¶
func (l ColourLogger) Flush() error
func (ColourLogger) Log ¶
func (l ColourLogger) Log(evs ...slog.Event)
type ContextParamLogger ¶
func (ContextParamLogger) Log ¶
func (l ContextParamLogger) Log(evs ...slog.Event)
type Entry ¶
type Entry struct { Message string `json:"message"` Severity string `json:"severity,omitempty"` Trace string `json:"logging.googleapis.com/trace,omitempty"` Params map[string]interface{} `json:"params,omitempty"` }
Entry ...
type StackDriverLogger ¶
type StackDriverLogger struct {
// contains filtered or unexported fields
}
StackDriverLogger is an implementation of monzo/slog.Logger that emits stackdriver compatible events
func (*StackDriverLogger) Flush ¶
func (l *StackDriverLogger) Flush() error
func (*StackDriverLogger) Log ¶
func (l *StackDriverLogger) Log(evs ...slog.Event)
Click to show internal directories.
Click to hide internal directories.