From 083b6848f0cdb03e93dcb9f9937ce754b77f5a31 Mon Sep 17 00:00:00 2001 From: Nicholas Blumhardt Date: Thu, 15 Aug 2019 16:42:07 +1000 Subject: [PATCH] Principle-of-least-surprise - use RenderedCompactJsonFormatter in the example JSON configuration --- README.md | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/README.md b/README.md index 7af50dd..b1996b3 100644 --- a/README.md +++ b/README.md @@ -71,7 +71,7 @@ Install-Package Serilog.Formatting.Compact Pass a formatter to the `Console()` configuration method: ```csharp - .WriteTo.Console(new CompactJsonFormatter()) + .WriteTo.Console(new RenderedCompactJsonFormatter()) ``` Output theming is not available when custom formatters are used. @@ -156,18 +156,6 @@ To configure the console sink with a different theme and include the `SourceCont } ``` -### Upgrading from _Serilog.Sinks.Console_ 2.x - -To achieve output identical to version 2 of this sink, specify a formatter and output template explicitly: - -```csharp - .WriteTo.Console(new MessageTemplateTextFormatter( - "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level}] {Message}{NewLine}{Exception}", - null)) -``` - -This will bypass theming and use Serilog's built-in message template formatting. - ### Contributing Would you like to help make the Serilog console sink even better? We keep a list of issues that are approachable for newcomers under the [up-for-grabs](https://github.com/serilog/serilog-sinks-console/issues?labels=up-for-grabs&state=open) label. Before starting work on a pull request, we suggest commenting on, or raising, an issue on the issue tracker so that we can help and coordinate efforts. For more details check out our [contributing guide](CONTRIBUTING.md).