From 78a7f6d8d1d1d7d793cfe89cd94767a5ba97fab7 Mon Sep 17 00:00:00 2001 From: Troy Dai Date: Thu, 4 Feb 2016 22:10:57 -0800 Subject: [PATCH] Fix the exception throw during logging. The '{}' in the message causes formatter exception when it appears in string interpolation. --- .../commands/dotnet-projectmodel-server/ProcessingQueue.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dotnet/commands/dotnet-projectmodel-server/ProcessingQueue.cs b/src/dotnet/commands/dotnet-projectmodel-server/ProcessingQueue.cs index 1d69aa18b..f0baa362a 100644 --- a/src/dotnet/commands/dotnet-projectmodel-server/ProcessingQueue.cs +++ b/src/dotnet/commands/dotnet-projectmodel-server/ProcessingQueue.cs @@ -59,7 +59,7 @@ namespace Microsoft.DotNet.ProjectModel.Server { return Send(_writer => { - _log.LogInformation($"Send ({message})"); + _log.LogInformation("OnSend ({0})", message); _writer.Write(JsonConvert.SerializeObject(message)); }); } @@ -73,7 +73,7 @@ namespace Microsoft.DotNet.ProjectModel.Server var content = _reader.ReadString(); var message = JsonConvert.DeserializeObject(content); - _log.LogInformation($"OnReceive({message})"); + _log.LogInformation("OnReceive ({0})", message); OnReceive(message); } }