PrettyLogging.Console
1.0.0
dotnet add package PrettyLogging.Console --version 1.0.0
NuGet\Install-Package PrettyLogging.Console -Version 1.0.0
<PackageReference Include="PrettyLogging.Console" Version="1.0.0" />
paket add PrettyLogging.Console --version 1.0.0
#r "nuget: PrettyLogging.Console, 1.0.0"
// Install PrettyLogging.Console as a Cake Addin #addin nuget:?package=PrettyLogging.Console&version=1.0.0 // Install PrettyLogging.Console as a Cake Tool #tool nuget:?package=PrettyLogging.Console&version=1.0.0
Pretty Logging
Make Microsoft.Extensions.Logging
easier on the eyes!
⭐ if you like it ![GitHub Repo stars](https://img.shields.io/github/stars/xiaomi7732/PrettyLogging?style=plastic)
If you like this project, please ⭐️ it by clicking the star in the top-right corner to help others discover it!
Got ideas or found a bug? Feel free to open an issue and share your feedback!
Current version
Getting started
Install the NuGet package:
Run the following command to add the pre-release version of the package:
dotnet add package PrettyLogging.Console --prerelease # TODO: Release a stable version.
Set up Pretty Logging in your app
Add the
PrettyIt()
method to your logger configuration:builder.Logging.PrettyIt();
For a full example, check out Program.cs.
If you are using this with an Console application, check out this Program.cs.
Optionally, customize it:
You can customize log output by controlling options such as log level visibility, timestamp inclusion, log format (single-line or multi-line), color behavior and more. See Options.md for more details.
Enjoy the clean output
Console application
Before:
info: Program[0] Hello Pretty Logging info: Program[0] This is a warning!
After:
2025-01-03T16:28:30.2001407-08:00|INFO |Hello Pretty Logging 2025-01-03T16:28:30.2064911-08:00|WARN |This is a warning!
WebAPI:
Before:
info: Microsoft.Hosting.Lifetime[14] Now listening on: http://localhost:5140 info: Microsoft.Hosting.Lifetime[0] Application started. Press Ctrl+C to shut down. info: Microsoft.Hosting.Lifetime[0] Hosting environment: Development info: Microsoft.Hosting.Lifetime[0] Content root path: C:\AIR\PrettyLogging\examples\UsePrettyLogging.WebAPI info: Microsoft.AspNetCore.Hosting.Diagnostics[1] Request starting HTTP/1.1 GET http://localhost:5140/ - - - info: Microsoft.AspNetCore.Routing.EndpointMiddleware[0] Executing endpoint 'HTTP: GET /' info: Microsoft.AspNetCore.Routing.EndpointMiddleware[1] Executed endpoint 'HTTP: GET /' info: Microsoft.AspNetCore.Hosting.Diagnostics[2] Request finished HTTP/1.1 GET http://localhost:5140/ - 200 - text/plain;+charset=utf-8 36.5664ms
After:
2025-01-03T17:56:08.7340978-08:00|INFO |Now listening on: http://localhost:5140 2025-01-03T17:56:08.7401957-08:00|INFO |Application started. Press Ctrl+C to shut down. 2025-01-03T17:56:08.7408854-08:00|INFO |Hosting environment: Development 2025-01-03T17:56:08.7409246-08:00|INFO |Content root path: C:\AIR\PrettyLogging\examples\UsePrettyLogging.WebAPI 2025-01-03T17:56:18.2800129-08:00|INFO |Request starting HTTP/1.1 GET http://localhost:5140/ - - - 2025-01-03T17:56:18.3165023-08:00|INFO |Executing endpoint 'HTTP: GET /' 2025-01-03T17:56:18.3196735-08:00|INFO |Executed endpoint 'HTTP: GET /' 2025-01-03T17:56:18.3273233-08:00|INFO |Request finished HTTP/1.1 GET http://localhost:5140/ - 200 - text/plain;+charset=utf-8 41.9690ms
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 is compatible. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 4.6.2
- Microsoft.Extensions.Logging.Console (>= 6.0.0)
-
.NETStandard 2.0
- Microsoft.Extensions.Logging.Console (>= 6.0.0)
-
net8.0
- Microsoft.Extensions.Logging.Console (>= 8.0.0)
-
net9.0
- Microsoft.Extensions.Logging.Console (>= 9.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories (1)
Showing the top 1 popular GitHub repositories that depend on PrettyLogging.Console:
Repository | Stars |
---|---|
IoTSharp/IoTSharp
IoTSharp is an open-source IoT platform for data collection, processing, visualization, and device management.
|
Version | Downloads | Last updated |
---|---|---|
1.0.0 | 70 | 2/11/2025 |
1.0.0-beta4 | 69 | 2/4/2025 |
1.0.0-beta3 | 64 | 1/28/2025 |
1.0.0-beta2 | 36 | 1/24/2025 |
1.0.0-beta1 | 72 | 1/11/2025 |