Skip to content

Commit

Permalink
write traitreport to a file on disconnect, not stdout
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisforbes committed Apr 29, 2011
1 parent 3a0dcf3 commit 0b0e857
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions OpenRA.Game/TraitDictionary.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@ ITraitContainer InnerGet( Type t )

public void PrintReport()
{
foreach( var t in traits.OrderByDescending(t => t.Value.Queries).TakeWhile(t => t.Value.Queries > 0) )
Console.WriteLine ("{0}: {1}", t.Key.Name, t.Value.Queries );
Log.AddChannel("traitreport", "traitreport.log");
foreach (var t in traits.OrderByDescending(t => t.Value.Queries).TakeWhile(t => t.Value.Queries > 0))
Log.Write("traitreport", "{0}: {1}", t.Key.Name, t.Value.Queries);
}

// construct this delegate once.
Expand Down

0 comments on commit 0b0e857

Please sign in to comment.