Permalink
Browse files

Fix logger bugs

  • Loading branch information...
1 parent c0d43e5 commit 5bb311a48fce4494333e8328f40df321ffc226cf @paulcbetts committed Jun 17, 2011
Showing with 6 additions and 5 deletions.
  1. +5 −3 ReactiveUI/Logging.cs
  2. +1 −2 ReactiveUI/RxApp.cs
View
@@ -4,6 +4,7 @@
using System.Globalization;
using System.Text;
using System.Threading;
+using System.Diagnostics;
using System.Diagnostics.Contracts;
#if DOTNETISOLDANDSAD
@@ -252,10 +253,11 @@ void write(Action<string> channel, string format, object[] args, IFormatProvider
{
Contract.Requires(format != null);
- object[] param = new object[args.Length + 2];
+ object[] param = new object[3];
param[0] = provider ?? (IFormatProvider)CultureInfo.InvariantCulture;
param[1] = format;
- args.CopyTo(param, 2);
+ param[2] = args;
+
channel(getPrefix() + (string)stringFormat.Invoke(null, param));
}
@@ -381,4 +383,4 @@ public void Exit()
#endif
}
-// vim: tw=120 ts=4 sw=4 et :
+// vim: tw=120 ts=4 sw=4 et :
View
@@ -140,7 +140,6 @@ static RxApp()
/// </summary>
public static Func<string, ILog> LoggerFactory { get; set; }
-
[ThreadStatic] static IMessageBus _UnitTestMessageBus;
static IMessageBus _MessageBus;
@@ -456,4 +455,4 @@ public void Release()
}
}
-// vim: tw=120 ts=4 sw=4 et :
+// vim: tw=120 ts=4 sw=4 et :

0 comments on commit 5bb311a

Please sign in to comment.