Created
June 22, 2015 18:55
-
-
Save monoman/9024d8a1e5f704746728 to your computer and use it in GitHub Desktop.
For testing purposes, unashamedly stealing from https://github.com/MassTransit/Sample-Courier/blob/master/src/Client/Program.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static void ConfigureLogger() | |
{ | |
const string logConfig = @"<?xml version=""1.0"" encoding=""utf-8"" ?> | |
<log4net> | |
<root> | |
<level value=""INFO"" /> | |
<appender-ref ref=""console"" /> | |
</root> | |
<appender name=""console"" type=""log4net.Appender.ColoredConsoleAppender""> | |
<layout type=""log4net.Layout.PatternLayout""> | |
<conversionPattern value=""%m%n"" /> | |
</layout> | |
</appender> | |
</log4net>"; | |
using (var stream = new MemoryStream(Encoding.UTF8.GetBytes(logConfig))) | |
{ | |
XmlConfigurator.Configure(stream); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment