Documentation ¶
Index ¶
- Constants
- type CloudLoggingHandler
- func (h *CloudLoggingHandler) Enabled(ctx context.Context, level slog.Level) bool
- func (h *CloudLoggingHandler) Handle(ctx context.Context, rec slog.Record) error
- func (h *CloudLoggingHandler) WithAttrs(attrs []slog.Attr) slog.Handler
- func (h *CloudLoggingHandler) WithGroup(name string) slog.Handler
- type HTTPHandler
Constants ¶
View Source
const CloudTraceContextHeader = "X-Cloud-Trace-Context"
The header specification is: "X-Cloud-Trace-Context: TRACE_ID/SPAN_ID;o=TRACE_TRUE"
View Source
const LevelCritical = slog.Level(12)
Extra log level supported by Cloud Logging
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CloudLoggingHandler ¶
type CloudLoggingHandler struct {
// contains filtered or unexported fields
}
Handler that outputs JSON understood by the structured log agent. See https://cloud.google.com/logging/docs/agent/logging/configuration#special-fields
func NewCloudLoggingHandler ¶
func NewCloudLoggingHandler(projectID string, level slog.Level) *CloudLoggingHandler
type HTTPHandler ¶
func (*HTTPHandler) ServeHTTP ¶
func (h *HTTPHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
Click to show internal directories.
Click to hide internal directories.