Fix the exception throw during logging.
The '{}' in the message causes formatter exception when it appears in string interpolation.
This commit is contained in:
parent
5075b8892e
commit
78a7f6d8d1
1 changed files with 2 additions and 2 deletions
|
@ -59,7 +59,7 @@ namespace Microsoft.DotNet.ProjectModel.Server
|
||||||
{
|
{
|
||||||
return Send(_writer =>
|
return Send(_writer =>
|
||||||
{
|
{
|
||||||
_log.LogInformation($"Send ({message})");
|
_log.LogInformation("OnSend ({0})", message);
|
||||||
_writer.Write(JsonConvert.SerializeObject(message));
|
_writer.Write(JsonConvert.SerializeObject(message));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -73,7 +73,7 @@ namespace Microsoft.DotNet.ProjectModel.Server
|
||||||
var content = _reader.ReadString();
|
var content = _reader.ReadString();
|
||||||
var message = JsonConvert.DeserializeObject<Message>(content);
|
var message = JsonConvert.DeserializeObject<Message>(content);
|
||||||
|
|
||||||
_log.LogInformation($"OnReceive({message})");
|
_log.LogInformation("OnReceive ({0})", message);
|
||||||
OnReceive(message);
|
OnReceive(message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue