Documentation
¶
Index ¶
- func Version() string
- type GoogleCloudSlogHandler
- func (h *GoogleCloudSlogHandler) Close() error
- func (h *GoogleCloudSlogHandler) Enabled(ctx context.Context, level slog.Level) bool
- func (h *GoogleCloudSlogHandler) Handle(ctx context.Context, r slog.Record) error
- func (h *GoogleCloudSlogHandler) WithAttrs(attrs []slog.Attr) slog.Handler
- func (h *GoogleCloudSlogHandler) WithGroup(name string) slog.Handler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type GoogleCloudSlogHandler ¶
type GoogleCloudSlogHandler struct {
// contains filtered or unexported fields
}
GoogleCloudSlogHandler wraps Google Cloud Logging's Logger for use with slog.
func NewGoogleCloudSlogHandler ¶
func NewGoogleCloudSlogHandler(ctx context.Context, projectID, logName string, opts *slog.HandlerOptions) *GoogleCloudSlogHandler
NewGoogleCloudSlogHandler initializes a new GoogleCloudSlogHandler.
func (*GoogleCloudSlogHandler) Close ¶
func (h *GoogleCloudSlogHandler) Close() error
Close closes the Google Cloud Logging client.
func (*GoogleCloudSlogHandler) Handle ¶
Handle adapts slog.Record entries to Google Cloud Logging entries.
Click to show internal directories.
Click to hide internal directories.