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: 0

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