如何在 PersistenConnection 上使用 Trace?
public class Connection : PersistentConnection
{
protected override Task OnConnectedAsync(IRequest request, string connectionId)
{
Trace.TraceInformation("ConnectedAsync ConnectionId:{0}", connectionId);
return base.OnConnectedAsync(request, connectionId);
}
}
如何附加 Trace 侦听器,以便 TraceInformation 调用中的信息变得可见?