Documentation
¶
Overview ¶
Package logger adapts go-partial diagnostic events to log/slog.
Index ¶
Constants ¶
View Source
const (
// EventTemplateLog identifies diagnostic events emitted from templates.
EventTemplateLog = "ext.logger.template"
)
Variables ¶
This section is empty.
Functions ¶
func Logger ¶
func Logger(ctx *partial.RenderContext, message string, pairs ...any) string
Logger emits an info-level diagnostic event from template code.
go-doc:sig func(message string, pairs ...any) string
func Stage ¶
func Stage() partial.RenderStage
Stage installs the request-scoped logger template helper.
Types ¶
type Option ¶
type Option func(*config)
Option configures a logger sink.
func WithMinLevel ¶
func WithMinLevel(level partial.EventLevel) Option
WithMinLevel ignores events below level.
Click to show internal directories.
Click to hide internal directories.