Reduce boxing in logging (#88560)
authorDavid Fowler <davidfowl@gmail.com>
Mon, 10 Jul 2023 20:50:15 +0000 (16:50 -0400)
committerGitHub <noreply@github.com>
Mon, 10 Jul 2023 20:50:15 +0000 (16:50 -0400)
commitad13e28df974e4a7001a2580127c4d3ef44238d9
tree305b2a3f9649e3c48b5900e8eac93303e2f825d7
parent54cb57399dabbfdcc1f7621b81c0420863a8f39c
Reduce boxing in logging (#88560)

- Logging got overhauled to use CompositeFormat in .NET 8, this allows for non boxing string formatting via string.Format. There's one piece of code that boxing the generic argument before handing off to string.Format so remove it for primitive types and enums.
src/libraries/Microsoft.Extensions.Logging.Abstractions/src/LogValuesFormatter.cs