Overview of ZLogger
masterZLogger is a zero-allocation text and structured logger for .NET and Unity. It is built on top of Microsoft.Extensions.Logging, allowing it to integrate seamlessly with frameworks like ASP.NET Core and Generic Host while eliminating the overhead typically associated with bridging different logging systems.
Key features include:
- High Performance: Leverages C# 10 String Interpolation and .NET 8's
IUtf8SpanFormattableto output directly in UTF8, avoiding the costs of UTF16-to-UTF8 encoding and value boxing. - Structured Logging: Integrates with
System.Text.Json'sUtf8JsonWriterfor efficient structured log output. - Cloud-Native Optimized: Designed for high-performance console output suitable for cloud log management.
- Compatibility: Delivers peak performance on .NET 8+, but maintains consistent performance on .NET 6 and .NET Standard 2.0 via a custom fallback implementation.
- Standard Features: Supports
LogLevelconfiguration from JSON, category filtering, and logging scopes.