Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix logger bugs

  • Loading branch information...
commit 5bb311a48fce4494333e8328f40df321ffc226cf 1 parent c0d43e5
@paulcbetts authored
Showing with 6 additions and 5 deletions.
  1. +5 −3 ReactiveUI/Logging.cs
  2. +1 −2  ReactiveUI/RxApp.cs
View
8 ReactiveUI/Logging.cs
@@ -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
3  ReactiveUI/RxApp.cs
@@ -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 :
Please sign in to comment.
Something went wrong with that request. Please try again.