Skip to content

Commit c2ffd6e

Browse files
committed
Moved sample code from Wiki [Skip CI]
1 parent 782d93f commit c2ffd6e

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,19 @@ The console sink for Serilog.
44

55
[![Build status](https://ci.appveyor.com/api/projects/status/w1w3m1wyk3in1c96/branch/master?svg=true)](https://ci.appveyor.com/project/serilog/serilog-sinks-console/branch/master) [![NuGet Version](http://img.shields.io/nuget/v/Serilog.Sinks.Console.svg?style=flat)](https://www.nuget.org/packages/Serilog.Sinks.Console/)
66

7+
Writes to the system console, using colour to emphasise levels and to highlight structured data within log messages. Makes the ordinary console sink look ordinary! (_See also: [Literate Console](https://github.com/serilog/serilog-sinks-literate)_)
8+
9+
```csharp
10+
var log = new LoggerConfiguration()
11+
.WriteTo.ColoredConsole()
12+
.CreateLogger();
13+
```
14+
Or in XML [app-settings format](https://github.com/serilog/serilog/wiki/AppSettings):
15+
16+
```xml
17+
<add key="serilog:write-to:ColoredConsole" />
18+
```
19+
720
* [Documentation](https://github.com/serilog/serilog/wiki)
821

922
Copyright &copy; 2016 Serilog Contributors - Provided under the [Apache License, Version 2.0](http://apache.org/licenses/LICENSE-2.0.html).

0 commit comments

Comments
 (0)