logging

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2026 License: Apache-2.0 Imports: 5 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package logging wires the structured logger used by the MCP server. Log-trace correlation is opt-in: only records emitted via L(ctx) carry the active span's trace context.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func L

func L(ctx context.Context) *zap.Logger

L returns the global zap logger carrying ctx so the otelzap bridge stamps the span's native trace context onto exported log records. No span, no change.

func NewLogger

func NewLogger(level zapcore.Level, path string) (*zap.Logger, error)

NewLogger returns a JSON zap logger. Empty path or "-" writes to stderr (stdio transport owns stdout); any other value is opened append-only.

Types

This section is empty.

Jump to

Keyboard shortcuts

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