Skip to content
Browse files

Made changes as per code review feedback

  • Loading branch information...
1 parent bfe50e5 commit a34772092d06fb4a2519283a21fdd5f6763a6589 @abnanda1 abnanda1 committed Dec 19, 2013
Showing with 5 additions and 12 deletions.
  1. +5 −12 src/Microsoft.AspNet.SignalR.Core/Messaging/ScaleoutStream.cs
View
17 src/Microsoft.AspNet.SignalR.Core/Messaging/ScaleoutStream.cs
@@ -111,7 +111,7 @@ public Task Send(Func<object, Task> send, object state)
public void SetError(Exception error)
{
- Trace("Error has happened with the following exception: {0}.", SourceLevels.Error, error);
+ Trace(TraceEventType.Error, "Error has happened with the following exception: {0}.", error);
lock (_lockObj)
{
@@ -167,7 +167,7 @@ private static Task Send(object state)
{
var ctx = (SendContext)obj;
- ctx.Stream.Trace("Send failed: {0}", SourceLevels.Error, ex);
+ ctx.Stream.Trace(TraceEventType.Error, "Send failed: {0}", ex);
lock (ctx.Stream._lockObj)
{
@@ -244,7 +244,7 @@ private bool ChangeState(StreamState newState)
if (_state != newState)
{
- Trace("Changed state from {0} to {1}", SourceLevels.Information, _state, newState);
+ Trace(TraceEventType.Information, "Changed state from {0} to {1}", _state, newState);
_state = newState;
return true;
@@ -270,16 +270,9 @@ private static Task Drain(TaskQueue queue)
return tcs.Task;
}
- private void Trace(string value, SourceLevels traceLevel, params object[] args)
+ private void Trace(TraceEventType traceEventType, string value, params object[] args)
{
- if (traceLevel == SourceLevels.Error)
- {
- _trace.TraceError(_tracePrefix + " - " + value, args);
- }
- else
- {
- _trace.TraceInformation(_tracePrefix + " - " + value, args);
- }
+ _trace.TraceEvent(traceEventType, 0, _tracePrefix + " - " + value, args);
}
private class SendContext

0 comments on commit a347720

Please sign in to comment.
Something went wrong with that request. Please try again.