Cysharp / ZLogger

Zero Allocation Text/Structured Logger for .NET with StringInterpolation and Source Generator, built on top of a Microsoft.Extensions.Logging.
MIT License
1.25k stars 88 forks source link

Add nullable annotation to generated code #135

Closed tetsuzin closed 9 months ago

tetsuzin commented 9 months ago
// Generation source
[ZLoggerMessage(LogLevel.Error, "Hello {str} {x}")]
public partial void ErrNullable(ILogger logger, string? str, int? x, Exception? exception = null);

before

image

after

image

neuecc commented 9 months ago

thanks, I'll release soon!