Skip to content

Conversation

@henribredt
Copy link
Owner

Implements structured logging feature that allows attaching type-safe metadata to log messages. Key additions:

  • New LogMetadata type for structured data with dictionary literal support
  • MetadataValue enum supporting String, Int, Double, Bool, Arrays, Dictionaries
  • Updated LogDestination protocol with metadata-aware log method
  • Extended ExposedCategoryLogger with metadata parameters for all log levels
  • ConsoleDestination formats metadata as key-value pairs
  • LocalFileDestination persists metadata as JSON
  • Added macOS 13.0 platform support to Package.swift
  • Updated Sample.swift with structured logging examples

Usage:
logger.network.info("Request completed", metadata: [
"status": 200,
"duration": 0.45,
"url": "https://api.example.com"
])

🤖 Generated with Claude Code

Implements structured logging feature that allows attaching type-safe
metadata to log messages. Key additions:

- New LogMetadata type for structured data with dictionary literal support
- MetadataValue enum supporting String, Int, Double, Bool, Arrays, Dictionaries
- Updated LogDestination protocol with metadata-aware log method
- Extended ExposedCategoryLogger with metadata parameters for all log levels
- ConsoleDestination formats metadata as key-value pairs
- LocalFileDestination persists metadata as JSON
- Added macOS 13.0 platform support to Package.swift
- Updated Sample.swift with structured logging examples

Usage:
logger.network.info("Request completed", metadata: [
    "status": 200,
    "duration": 0.45,
    "url": "https://api.example.com"
])

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants