logging

package
v0.18.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 8, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContentLogger

func ContentLogger(provider interfaces.LoggerProvider) interfaces.Logger

ContentLogger returns the logger namespace reserved for content services.

func ContextFields

func ContextFields(ctx context.Context) map[string]any

ContextFields extracts previously annotated logging fields from the context. A defensive copy is returned so callers can mutate the map without affecting future log entries.

func ContextWithFields

func ContextWithFields(ctx context.Context, fields map[string]any) context.Context

ContextWithFields returns a context carrying structured logging fields that console loggers can merge into subsequent entries. Existing fields on the context are preserved and merged with the provided values.

func GeneratorLogger

func GeneratorLogger(provider interfaces.LoggerProvider) interfaces.Logger

GeneratorLogger returns the logger namespace reserved for generator workflows.

func MarkdownLogger

func MarkdownLogger(provider interfaces.LoggerProvider) interfaces.Logger

MarkdownLogger returns the logger namespace reserved for markdown workflows.

func ModuleLogger

func ModuleLogger(provider interfaces.LoggerProvider, module string) interfaces.Logger

ModuleLogger returns a module-scoped logger, defaulting to a no-op implementation when no provider is supplied. The returned logger attaches the module identifier as structured context so downstream entries can be filtered predictably.

func NoOp

func NoOp() interfaces.Logger

NoOp returns a logger that drops every log entry. It satisfies the Logger contract so services can safely operate when logging is disabled.

func PagesLogger

func PagesLogger(provider interfaces.LoggerProvider) interfaces.Logger

PagesLogger returns the logger namespace reserved for page services.

func SchedulerLogger

func SchedulerLogger(provider interfaces.LoggerProvider) interfaces.Logger

SchedulerLogger returns the logger namespace reserved for scheduler workers.

func StorageLogger added in v0.2.0

func StorageLogger(provider interfaces.LoggerProvider) interfaces.Logger

StorageLogger returns the logger namespace reserved for storage orchestration.

func WithFields

func WithFields(logger interfaces.Logger, fields map[string]any) interfaces.Logger

WithFields attaches structured fields to a logger when the implementation supports the optional FieldsLogger extension. Callers can pass nil or an empty map to skip allocation safely.

func WithMarkdownContext

func WithMarkdownContext(logger interfaces.Logger, path, locale, action string) interfaces.Logger

WithMarkdownContext enriches the provided logger with common markdown fields such as file path, locale, and sync action. Empty values are ignored.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL