Skip to content
This repository was archived by the owner on Dec 13, 2018. It is now read-only.

Commit a69869b

Browse files
committed
ensure curly braces in log messages works after I broke it :)
1 parent 7d10b81 commit a69869b

File tree

4 files changed

+5
-6
lines changed

4 files changed

+5
-6
lines changed

src/Microsoft.Framework.Logging.Console/IConsole.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ public interface IConsole
66
{
77
ConsoleColor BackgroundColor { get; set; }
88
ConsoleColor ForegroundColor { get; set; }
9-
void WriteLine(string format, params object[] args);
9+
void WriteLine(string message);
1010
}
1111
}

src/Microsoft.Framework.Logging.Console/LogConsole.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ public ConsoleColor ForegroundColor
3131
}
3232
}
3333

34-
public void WriteLine(string format, params object[] args)
34+
public void WriteLine(string message)
3535
{
36-
System.Console.Error.WriteLine(format, args);
36+
System.Console.Error.WriteLine(message);
3737
}
3838
}
3939
}

test/Microsoft.Framework.Logging.Test/Console/TestConsole.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,8 @@ public TestConsole(ConsoleSink sink)
1919

2020
public ConsoleColor ForegroundColor { get; set; }
2121

22-
public void WriteLine(string format, params object[] args)
22+
public void WriteLine(string message)
2323
{
24-
var message = string.Format(format, args);
2524
_sink.Write(new ConsoleContext()
2625
{
2726
ForegroundColor = ForegroundColor,

test/Microsoft.Framework.Logging.Test/ConsoleLoggerTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ namespace Microsoft.Framework.Logging.Test
1414
public class ConsoleLoggerTest
1515
{
1616
private const string _name = "test";
17-
private const string _state = "This is a test";
17+
private const string _state = "This is a test, and {curly braces} are just fine!";
1818

1919
private static readonly Func<object, Exception, string> TheMessageAndError =
2020
(message, error) => string.Format(CultureInfo.CurrentCulture, "{0}\r\n{1}", message, error);

0 commit comments

Comments
 (0)