Releases: willibrandon/mtlog
v0.10.0
What's Changed
Added
-
Sentry Error Tracking Adapter - Enterprise-grade error monitoring integration (#63)
- Automatic error capture with stack traces and breadcrumbs
- Transaction tracking for distributed tracing
- 7 sampling strategies: fixed, adaptive, priority, burst detection, group-based, profiles, and custom
- Retry logic with exponential backoff for network resilience
- Real-time metrics and observability with atomic counters
- Message template interpolation in Sentry UI
- Performance optimized: stack trace caching (60.74 ns/op), retry calculation (11.07 ns/op)
- Separate module at
github.com/willibrandon/mtlog/adapters/sentry
-
Context Deadline Awareness - Automatic timeout warnings (#48)
- Automatically detects and warns when operations approach context deadlines
- Configurable warning threshold (e.g., warn when <100ms remaining)
- Adds properties:
DeadlineRemaining,DeadlineAt,DeadlineApproaching - Optionally upgrades log level (Info → Warning) when deadline is near
- Zero-cost when context has no deadline
- Perfect for HTTP handlers, database operations, and microservice calls
-
Per-Message Sampling - Adaptive log volume control (#61)
- Multiple sampling strategies: counter-based, rate-based, time-based, first-N, group-based, conditional, exponential backoff
- Adaptive sampling automatically adjusts rate to maintain target events/second
- Oscillation prevention with hysteresis threshold and dampening factor
- Profile versioning with semantic versioning and migration policies
- Thread-safe, immutable profile registry with freeze capability
- Performance: 17ns for simple sampling decisions, 209ns with properties
- Fluent configuration API with predefined dampening presets
-
Conditional and Router Sinks - Advanced event routing (#60)
- Zero-overhead conditional routing (3.7ns when predicate returns false)
- Flexible routing modes: FirstMatch (exclusive) and AllMatch (broadcast)
- Production resilience: circuit breakers, health checks, fallback sinks
- Enterprise monitoring: Prometheus metrics, Grafana dashboards
- Runtime management: add/remove routes and groups dynamically
- 11 documented routing patterns for real-world scenarios
- JSON configuration support via existing configuration builder
-
HTTP Middleware - Multi-framework request/response logging (#59)
- Support for net/http, Gin, Echo, Fiber, and Chi frameworks
- Request/response logging with configurable fields and timing
- Request ID generation and propagation with multiple header support
- Context injection for nested logging with helper methods
- Configurable log levels based on HTTP status codes
- Advanced sampling strategies: rate-based, adaptive, path-based, composite
- Object pooling for zero-allocation paths (~2.3μs per request overhead)
- Distributed tracing support (W3C Trace Context, B3, X-Ray)
- Panic recovery with detailed stack traces
- Separate module at
github.com/willibrandon/mtlog/adapters/middleware
-
RenderMessage() Method - Public API for rendering message templates (#64)
- New
RenderMessage()method oncore.LogEventfor custom sinks - Properly handles capturing operators (
{@Property}), scalar hints ({$Property}), and format specifiers ({Property:format}) - Enables custom sinks to render message templates without accessing internal parser
- Returns the original template as fallback if parsing fails
- Example:
message := event.RenderMessage()renders the template with all properties
- New
-
Zed Extension - Full editor support via Language Server Protocol (#56)
- New
mtlog-lspcommand providing LSP wrapper for mtlog-analyzer - Native Zed extension using Rust/WASM (wasm32-wasip2 target)
- Real-time diagnostics for all MTLOG001-MTLOG013 issues
- Code actions with quick fixes for common problems
- Automatic binary detection in standard Go paths
- Configurable analyzer flags and custom paths
- Proper UTF-16 code unit handling for accurate text positioning
- Comprehensive CI/CD integration with GitHub Actions
- New
Installation
mtlog Library
go get github.com/willibrandon/[email protected]mtlog-analyzer Tool
Download the binary for your platform below.
VS Code Extension
Install from the VS Code Marketplace or download the .vsix file below.
GoLand Plugin
Install from JetBrains Marketplace or download the .zip file below.
Neovim Plugin
-- Using lazy.nvim
{
'willibrandon/mtlog',
rtp = 'neovim-plugin',
ft = 'go',
tag = 'v0.10.0',
config = function()
require('mtlog').setup()
end,
}Or download the .tar.gz file below for manual installation.
Full Changelog: v0.9.0...v0.10.0
v0.9.0
What's Changed
Added
-
Core Library
-
With()method for structured field logging (#42, #55)- Adds key-value pairs to log events:
logger.With("service", "api", "version", "1.0") - Chainable for building context:
logger.With("env", "prod").With("region", "us-west") - Performance optimized: 0 allocations when no fields, 2 allocations for ≤64 fields
- Maintains structured properties for Serilog compatibility
- Comprehensive analyzer diagnostics (MTLOG009-MTLOG013) for common mistakes
- Adds key-value pairs to log events:
-
OpenTelemetry (OTEL) Adapter - Full integration with OpenTelemetry ecosystem
- OTLP exporter with gRPC and HTTP transports
- Adaptive sampling based on trace decisions
- Automatic trace/span context correlation
- Resource detection (process, OS, runtime)
- Configurable batching and retry logic
- TLS support with automatic detection
- Comprehensive integration tests with real OTEL collector
-
Modern Serilog Alignment - Enhanced formatting capabilities (#37)
- New
:jformat specifier for JSON output:{Data:j}renders any value as JSON - New
:qformat specifier to explicitly quote strings:{Name:q}→"Alice" - New
:lformat specifier for literal string output (no escaping) - Numeric property indexing:
{0},{1}for positional arguments (like .NET string.Format) - Structs render in Go style:
{Field1:value1 Field2:value2} - Improved nil handling with
Null{}sentinel type - Smart byte slice handling (UTF-8 string vs byte array)
- New
-
Template Cache Security Fix - LRU cache with bounded size (#39)
- Prevents memory exhaustion from unbounded template generation
- Configurable cache size (default: 10,000 entries)
- Sharded design for concurrent access (up to 64 shards)
- O(1) operations with proper LRU eviction
- Optional TTL support for time-based expiration
-
-
mtlog-analyzer Static Analysis Tool
- With() Method Diagnostics (MTLOG009-MTLOG013)
- MTLOG009: Empty With() calls
- MTLOG010: Duplicate properties in With()
- MTLOG011: With() called on nil logger
- MTLOG012: Invalid property count (odd number of arguments)
- MTLOG013: Non-string property names
- Suppression support via comments for all With() diagnostics
- With() Method Diagnostics (MTLOG009-MTLOG013)
-
IDE Extensions
-
VS Code Extension - Support for With() method diagnostics
- Real-time validation of With() method usage
- Quick fixes for common With() issues
- Updated to handle all new MTLOG009-MTLOG013 diagnostics
-
GoLand Plugin - Support for With() method diagnostics
- Full integration of With() method analysis
- Quick fixes and intention actions for With() issues
- Comprehensive test coverage for new diagnostics
-
Neovim Plugin - Enhanced reliability and With() diagnostics
- Support for MTLOG009-MTLOG013 diagnostics
- Improved test file creation in Go module context
- Better fix descriptions in MtlogQuickFix menu
- Comprehensive real-world testing framework
-
Documentation
- Added comprehensive With() method examples and documentation
- Created OpenTelemetry adapter documentation with integration examples
- Updated README with new format specifiers and numeric indexing examples
- Added static analysis section covering With() diagnostics
Installation
mtlog Library
go get github.com/willibrandon/[email protected]mtlog-analyzer Tool
Download the binary for your platform below.
VS Code Extension
Install from the VS Code Marketplace or download the .vsix file below.
GoLand Plugin
Install from JetBrains Marketplace or download the .zip file below.
Neovim Plugin
-- Using lazy.nvim
{
'willibrandon/mtlog',
rtp = 'neovim-plugin',
ft = 'go',
tag = 'v0.9.0',
config = function()
require('mtlog').setup()
end,
}Or download the .tar.gz file below for manual installation.
Full Changelog: v0.8.1...v0.9.0
v0.8.1
What's Changed
Fixed
- Neovim Plugin - Fixed commands not loading with lazy.nvim and other plugin managers
- Renamed
plugin/mtlog.luatoplugin/mtlog.vimand wrapped Lua code in vim heredoc - This ensures proper command registration regardless of plugin manager or loading strategy
- Commands are now available immediately after plugin installation without manual setup
- Renamed
Installation
mtlog Library
go get github.com/willibrandon/[email protected]mtlog-analyzer Tool
Download the binary for your platform below.
VS Code Extension
Install from the VS Code Marketplace or download the .vsix file below.
GoLand Plugin
Install from JetBrains Marketplace or download the .zip file below.
Neovim Plugin
-- Using lazy.nvim
{
'willibrandon/mtlog',
rtp = 'neovim-plugin',
ft = 'go',
tag = 'v0.8.1',
config = function()
require('mtlog').setup()
end,
}Or download the .tar.gz file below for manual installation.
Full Changelog: v0.8.0...v0.8.1
v0.8.0
What's Changed
Added
- Neovim Plugin - Comprehensive plugin for mtlog-analyzer integration (#31)
- Real-time analysis with debouncing and smart activation
- LSP integration providing code actions through standard interface
- Queue management for concurrent analysis with pause/resume
- Context rules for auto-enable/disable based on patterns
- Diagnostic suppression at session and workspace levels
- Interactive help system with
:MtlogHelpand:MtlogExplain - Telescope integration for fuzzy finding
- Statusline component with diagnostic counts
- 30+ test files with comprehensive coverage
- Requires Neovim >= 0.8.0
Installation
mtlog Library
go get github.com/willibrandon/[email protected]mtlog-analyzer Tool
Download the binary for your platform below.
VS Code Extension
Install from the VS Code Marketplace or download the .vsix file below.
GoLand Plugin
Install from JetBrains Marketplace or download the .zip file below.
Neovim Plugin
-- Using lazy.nvim
{
'willibrandon/mtlog',
rtp = 'neovim-plugin',
ft = 'go',
tag = 'v0.8.0',
config = function()
require('mtlog').setup()
end,
}Or download the .tar.gz file below for manual installation.
Full Changelog: v0.7.7...v0.8.0
v0.7.7
What's Changed
Added
-
Analyzer - MTLOG002 quick fixes for invalid format specifiers (#29)
- Automatically suggests valid format specifiers based on common mistakes
- Handles .NET-style format strings (e.g., "d3" → "000", "f2" → "F2")
- Supports all mtlog format types: numeric, float, percentage, exponential, hexadecimal
- Available in strict mode for comprehensive format validation
-
Analyzer - MTLOG005 enhanced capturing hints with LogValue() stub generation (#30)
- Dual quick fixes: add @ prefix OR generate LogValue() method stub
- Smart detection of sensitive fields (passwords, tokens, API keys, etc.)
- Generated stubs include TODO comments for sensitive fields
- Helps implement safe logging for complex types with sensitive data
-
VS Code Extension - Format specifier and LogValue() quick fixes
- Full support for MTLOG002 format specifier corrections
- LogValue() method stub generation for complex types
- Seamless integration with analyzer's suggested fixes
-
GoLand Plugin - Format specifier and LogValue() quick fixes
- Comprehensive support for MTLOG002 suggested fixes
- LogValue() stub generation with sensitive field detection
- Full test coverage for all new quick fix scenarios
Changed
-
Analyzer - Refactored codebase into focused, single-responsibility modules (#28)
- Separated type checking, string conversion, and context key logic
- Improved maintainability with clearer separation of concerns
- Enhanced testability through modular design
-
VS Code Extension - Modularized codebase and updated dependencies
- Cleaner separation of analyzer, diagnostics, and code action modules
- Updated all dependencies to latest versions
- Improved error handling and logging
Fixed
-
Analyzer - Improved error handling in test flag restoration
- Proper handling of Set() error returns in test cleanup
- More robust test framework flag management
-
Documentation - Enhanced IDE extension badges for better visibility
- Improved contrast for both light and dark mode compatibility
- Clearer visual indicators in marketplace listings
Installation
mtlog Library
go get github.com/willibrandon/[email protected]mtlog-analyzer Tool
Download the binary for your platform below.
VS Code Extension
Install from the VS Code Marketplace or download the .vsix file below.
GoLand Plugin
Install from JetBrains Marketplace or download the .zip file below.
Full Changelog: v0.7.6...v0.7.7
v0.7.6
What's Changed
Added
-
Analyzer - MTLOG007 quick fix for extracting repeated string literals to constants
- Detects when context keys (e.g., "user_id", "request_id") are used multiple times
- Generates appropriately named constants following Go naming conventions
- Intelligently handles acronyms (ID, URL, API, etc.) in constant names
- Finds optimal insertion position for const declarations
-
VS Code Extension - String-to-constant quick fix support
- Automatically applies MTLOG007 suggested fixes from analyzer
- Replaces all occurrences of the string literal with the new constant
-
GoLand Plugin - String-to-constant quick fix support
- Full support for MTLOG007 suggested fixes
- Comprehensive test coverage with 10 different scenarios
Fixed
-
Analyzer - MTLOG001 TODO comment placement for existing inline comments
- Now places TODO on next line when there's already a comment on the same line
- Prevents double comments and maintains better code readability
-
CI/CD - GoLand plugin tests now properly fail the CI pipeline
- Removed
|| truethat was hiding test failures - Builds analyzer from source instead of using @latest for accurate testing
- Removed
Installation
mtlog Library
go get github.com/willibrandon/[email protected]mtlog-analyzer Tool
Download the binary for your platform below.
VS Code Extension
Install from the VS Code Marketplace or download the .vsix file below.
GoLand Plugin
Install from JetBrains Marketplace or download the .zip file below.
Full Changelog: v0.7.5...v0.7.6
v0.7.5
What's Changed
Fixed
- GoLand Plugin - Fixed @ApiStatus.OverrideOnly violation flagged by JetBrains verification
- Extracted installation logic to static companion method to avoid direct actionPerformed invocation
- Maintains full functionality while complying with IntelliJ Platform API requirements
Installation
mtlog Library
go get github.com/willibrandon/[email protected]mtlog-analyzer Tool
Download the binary for your platform below.
VS Code Extension
Install from the VS Code Marketplace or download the .vsix file below.
GoLand Plugin
Install from JetBrains Marketplace or download the .zip file below.
Full Changelog: v0.7.4...v0.7.5
v0.7.4
What's Changed
Added
- IDE Installation UX - Smart analyzer detection and auto-install prompts (#22)
-
VS Code Extension
- Auto-detection in standard Go locations (
$GOBIN,$GOPATH/bin,~/go/bin) - One-click installation prompt when analyzer not found
- Improved error messages with specific paths and solutions
- Automatic path caching for performance
- Auto-detection in standard Go locations (
-
GoLand Plugin
- Smart path detection following Go's installation precedence
- Notification with Install/Settings actions when analyzer not found
- Support for platform-specific locations (Windows Apps, /usr/local/go/bin)
- findAnalyzerPath() made internal for testing
-
Fixed
- Build - Fixed invalid Go version format in go.mod (changed from
1.23.0to1.23) - VS Code Extension - Added test binaries to .vscodeignore to reduce package size
Installation
mtlog Library
go get github.com/willibrandon/[email protected]mtlog-analyzer Tool
Download the binary for your platform below.
VS Code Extension
Install from the VS Code Marketplace or download the .vsix file below.
GoLand Plugin
Install from JetBrains Marketplace or download the .zip file below.
Full Changelog: v0.7.3...v0.7.4
v0.7.3
What's Changed
Changed
- Analyzer Architecture - Centralized all quick fixes in the analyzer with stdin support (#21)
- IDE extensions now use analyzer-provided suggested fixes exclusively
- Transitioned from file-based to stdin-based communication for real-time analysis
- Removed ~1000 lines of duplicate quick fix code from IDE extensions
- Replaced os.ReadFile with AST-based analysis for better performance
Added
- Analyzer Quick Fixes - Suggested fixes for MTLOG001 (template/argument mismatch) and MTLOG006 (missing error parameter)
- MTLOG006 intelligently detects error variables in scope
- Adds appropriate error variable or
nilwith TODO comment
Fixed
- Performance - Eliminated repeated file I/O operations in both IDE extensions
- Stability - Fixed potential issues with stdin mode where files may not exist on disk
- Code Quality - Fixed analyzer tautological conditions and redundant control flow
- GoLand Plugin - Fixed IntelliJ IDEA Ultimate compatibility issue where plugin showed as "binary incompatible"
Installation
mtlog Library
go get github.com/willibrandon/[email protected]mtlog-analyzer Tool
Download the binary for your platform below.
VS Code Extension
Install from the VS Code Marketplace or download the .vsix file below.
GoLand Plugin
Install from JetBrains Marketplace or download the .zip file below.
Full Changelog: v0.7.2...v0.7.3
v0.7.2
What's Changed
Added
- Diagnostic Kill Switch - Quick disable/enable for all mtlog diagnostics in IDE extensions (#19)
-
VS Code Extension
- Command palette commands: "Toggle mtlog Diagnostics"
- Clickable status bar item showing analyzer state and diagnostic counts
- Diagnostic suppression with persistent workspace settings
- Quick action to suppress specific diagnostic types
- Keyboard shortcut: Ctrl+Alt+M (Cmd+Alt+M on Mac)
- Suppression manager for managing suppressed diagnostics
-
GoLand Plugin
- Status bar widget with visual state indicator (play/pause icons)
- Notification bar on startup with Disable/Settings actions
- Diagnostic suppression with immediate UI updates
- Intention actions and quick fixes for suppressing diagnostics
- Manage suppressed diagnostics dialog
- Persistent state across IDE restarts
-
Fixed
- GoLand Plugin - Fixed critical deadlock in template argument quick fix during preview generation
- Both Extensions - Suppressed diagnostics now disappear immediately without requiring file edits
Changed
- GoLand Plugin - Inspection now enabled by default for better user experience
Installation
mtlog Library
go get github.com/willibrandon/[email protected]mtlog-analyzer Tool
Download the binary for your platform below.
VS Code Extension
Install from the VS Code Marketplace or download the .vsix file below.
GoLand Plugin
Install from JetBrains Marketplace or download the .zip file below.
Full Changelog: v0.7.1...v0.7.2