Discover Packages
github.com/nuts-foundation/nuts-knooppunt
lib
logging
package
Version:
v0.4.2
Opens a new window with list of versions in this module.
Published: Dec 18, 2025
License: EUPL-1.2
Opens a new window with license information.
Imports: 5
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
Component returns a slog attribute for a component type.
Error returns a slog attribute for errors.
FHIRServer returns a slog attribute for FHIR server URLs.
Init initializes the global slog logger with JSON output and trace context injection.
Default log level is Debug to match previous zerolog configuration.
TypeOf returns a slog attribute with the type name of the given value.
ContextHandler wraps a slog.Handler and automatically adds trace context to log records.
When a valid OpenTelemetry span is present in the context, trace_id and span_id are added.
func (*ContextHandler) Handle ¶
Handle adds trace context attributes to the record before delegating to the wrapped handler.
func (*ContextHandler) WithAttrs ¶
WithAttrs returns a new handler with the given attributes.
func (*ContextHandler) WithGroup ¶
WithGroup returns a new handler with the given group name.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.