Created
July 19, 2014 01:33
-
-
Save blachniet/79c5b604dd457260257f to your computer and use it in GitHub Desktop.
Creates 2 top-level loggers, loggerA and loggerB using different configurations.
This file contains hidden or 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
| using System; | |
| using Serilog; | |
| public class Program | |
| { | |
| public static void Main() | |
| { | |
| var loggerA = new LoggerConfiguration().WriteTo.Console().CreateLogger(); | |
| loggerA.Information("Logging to top-level loggerA"); | |
| var loggerB = new LoggerConfiguration().WriteTo.ColoredConsole().CreateLogger(); | |
| loggerB.Information("Logging to top-level loggerB"); | |
| Console.WriteLine("Hello World"); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment