Skip to content

Commit

Permalink
redirect application logs to stdout and stderr
Browse files Browse the repository at this point in the history
  • Loading branch information
florindragos committed Jul 1, 2014
1 parent c10ef25 commit 2369b64
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -148,17 +148,23 @@ public override void ProcessEventFlush(WebEventBufferFlushInfo flushInfo)
extraInfo = webBasedErrorEvent.ErrorException.ToString();
}

this.customInfo.AppendLine(
string.Format(
string line = string.Format(
CultureInfo.InvariantCulture,
"Event Time (UTC):[{0}] Event Code:[{1}] Event Id:[{2}] Event Message:[{3}]",
eventRaised.EventTimeUtc,
eventRaised.EventCode,
eventRaised.EventID,
eventRaised.Message + " " + extraInfo));
}

this.StoreToFile(FileMode.Append);
eventRaised.Message + " " + extraInfo);

if (this.Name == "ErrorEventProvider")
{
Console.Error.WriteLine(line);
}
else
{
Console.Out.WriteLine(line);
}
}
}

/// <summary>
Expand Down

0 comments on commit 2369b64

Please sign in to comment.