Avoid string.Concat(params string[]) in SimpleConsoleFormatter.CreateDefaultLogMessag...
authorStephen Toub <stoub@microsoft.com>
Wed, 18 Nov 2020 17:41:24 +0000 (12:41 -0500)
committerGitHub <noreply@github.com>
Wed, 18 Nov 2020 17:41:24 +0000 (12:41 -0500)
commit38259c83703dbf6df50c814f7504e7073b5ffaef
treeda37bab93aebf163785a95a7c5612a4155481749
parent2d801010e2e3cea69c49b961a72f03f6d391715e
Avoid string.Concat(params string[]) in SimpleConsoleFormatter.CreateDefaultLogMessage (#44765)

It's resulting in a string[] allocation and a string allocation, when we can instead just make a few more individual calls to Write and stackalloc the integer.
src/libraries/Microsoft.Extensions.Logging.Console/src/SimpleConsoleFormatter.cs