https://github.com/verticalsoftware/vertical-spectreconsolelogger
Microsoft ILogger implementation for Spectre console
https://github.com/verticalsoftware/vertical-spectreconsolelogger
Last synced: about 1 year ago
JSON representation
Microsoft ILogger implementation for Spectre console
- Host: GitHub
- URL: https://github.com/verticalsoftware/vertical-spectreconsolelogger
- Owner: verticalsoftware
- License: mit
- Created: 2021-07-29T16:04:44.000Z (almost 5 years ago)
- Default Branch: dev
- Last Pushed: 2024-12-01T17:21:14.000Z (over 1 year ago)
- Last Synced: 2025-06-27T15:07:36.347Z (about 1 year ago)
- Language: C#
- Size: 1.44 MB
- Stars: 68
- Watchers: 2
- Forks: 7
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# vertical-spectreconsolelogger
A seriously customizable [Spectre Console](https://spectreconsole.net/) provider for Microsoft.Extensions.Logging. **Don't** change how your app logs - change how the logs are presented.



[](https://github.com/verticalsoftware/vertical-commandline/actions/workflows/dev-build.yml)
[](https://codecov.io/gh/verticalsoftware/vertical-spectreconsolelogger)
[](https://github.com/verticalsoftware/vertical-spectreconsolelogger/actions/workflows/pre-release.yml)
[](https://github.com/verticalsoftware/vertical-spectreconsolelogger/actions/workflows/release.yml)
## Quick Start
Add a package reference to your `.csproj` file:
```
$ dotnet add package vertical-spectreconsolelogger --prerelease
```
Call `AddSpectreConsole` in your logging setup:
```csharp
var loggerFactory = LoggerFactory.Create(builder => builder
.AddSpectreConsole());
var logger = loggerFactory.CreateLogger("MyLogger");
logger.LogInformation("Hello world!");
```
## Features at a glance
1. Decouples styling and formatting from logging (e.g. don't change your logging, customize how the events are displayed).
2. Define different customizations for _each_ log level.
3. Customize the styling and formatting of specific values or specific types of values.
4. Destructure and output complex types in JSON(ish) notation.
5. Customize the rendering completely using output templates.
6. Extend the logger with your own renderers.
#### Format/style log values

#### Destructured output follows configuration

#### Precisely control exception output

## Documentation
Read the full [docs](https://github.com/verticalsoftware/vertical-spectreconsolelogger/blob/dev/docs/docs-home.md) here.