From 0b0e857b13de4b6da0b02cc55a74569550c2276b Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Fri, 29 Apr 2011 19:38:54 +1200 Subject: [PATCH] write traitreport to a file on disconnect, not stdout --- OpenRA.Game/TraitDictionary.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/OpenRA.Game/TraitDictionary.cs b/OpenRA.Game/TraitDictionary.cs index 107bf53b84..db372bacc2 100755 --- a/OpenRA.Game/TraitDictionary.cs +++ b/OpenRA.Game/TraitDictionary.cs @@ -26,8 +26,9 @@ namespace OpenRA 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.