Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use RenderedCompactJsonFormatter in the example JSON configuration #69

Merged
merged 1 commit into from
Aug 15, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 1 addition & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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).
Expand Down