msbuild
msbuild copied to clipboard
Log helper methods should support a custom string interpolation handler
C# 10 supports string interpolation handlers that enable efficient behavior with calls like (from their examples):
logger.LogMessage(LogLevel.Trace, $"Trace Level. CurrentTime: {time:t}. This won't be printed.");
This would be really nice to have in Log.LogMessage
and related APIs.
I'm unclear on what the goal is here. Many of our logging helper methods call into our localized resources, so we couldn't do anything as clean as the example you shared. What are you thinking?
It's not about our logging; it's about the logging API we provide to tasks.