https://github.com/sharpjs/subatomix.logging
Additions to Microsoft.Extensions.Logging
https://github.com/sharpjs/subatomix.logging
Last synced: 10 months ago
JSON representation
Additions to Microsoft.Extensions.Logging
- Host: GitHub
- URL: https://github.com/sharpjs/subatomix.logging
- Owner: sharpjs
- License: isc
- Created: 2022-05-14T20:50:12.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-11-16T16:47:21.000Z (about 1 year ago)
- Last Synced: 2025-01-25T06:13:02.823Z (12 months ago)
- Language: C#
- Homepage:
- Size: 1010 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGES.md
- License: LICENSE.txt
Awesome Lists containing this project
README
---
outputFileName: index.html
---
# Subatomix.Logging
Additions to [Microsoft.Extensions.Logging](https://www.nuget.org/packages/Microsoft.Extensions.Logging)
in three NuGet packages:
- [**Subatomix.Logging**](https://www.nuget.org/packages/Subatomix.Logging)
- [`PrettyConsoleFormatter`](https://sharpjs.github.io/Subatomix.Logging/api/Subatomix.Logging/Subatomix.Logging.Console.html)
– A terse, colorful formatter for Microsoft's
[console logger](https://docs.microsoft.com/en-us/aspnet/core/fundamentals/logging/?view=aspnetcore-6.0#console).
- [`DebuggerLogger`](https://sharpjs.github.io/Subatomix.Logging/api/Subatomix.Logging/Subatomix.Logging.Debugger.html)
– A logger that sends messages to an attached debugger. In Visual Studio,
logged messages will appear in the debug output window.
- [`OperationScope`](https://sharpjs.github.io/Subatomix.Logging/api/Subatomix.Logging/Subatomix.Logging.OperationScope.html)
– A scope representing a logical operation. Automatically logs the start,
end, duration, and (optionally) the exception thrown from an operation.
- [`ActivityScope`](https://sharpjs.github.io/Subatomix.Logging/api/Subatomix.Logging/Subatomix.Logging.ActivityScope.html)
– An operation scope that also starts and stops an
[`Activity`](https://docs.microsoft.com/en-us/dotnet/core/diagnostics/distributed-tracing-instrumentation-walkthroughs).
The activity carries tags understood by
[Application Insights](https://docs.microsoft.com/en-us/azure/azure-monitor/app/app-insights-overview),
which can present the activity as a dependency telemetry item.
- [**Subatomix.Logging.Legacy**](https://www.nuget.org/packages/Subatomix.Logging.Legacy)
- [`LoggingTraceListener`](https://sharpjs.github.io/Subatomix.Logging/api/Subatomix.Logging.Legacy/Subatomix.Logging.Legacy.LoggingTraceListener.html)
– A trace listener plugin for the legacy
[`TraceSource`](https://docs.microsoft.com/en-us/dotnet/api/system.diagnostics.tracesource)
API. This listener forwards trace events to
[`ILogger`](https://docs.microsoft.com/en-us/dotnet/api/microsoft.extensions.logging.ilogger)
loggers.
- [`CorrelationManagerActivityListener`](https://sharpjs.github.io/Subatomix.Logging/api/Subatomix.Logging.Legacy/Subatomix.Logging.Legacy.CorrelationManagerActivityListener.html)
– A listener that flows
[`Activity`](https://docs.microsoft.com/en-us/dotnet/core/diagnostics/distributed-tracing-instrumentation-walkthroughs)
start and stop events to the legacy
[`CorrelationManager`](https://docs.microsoft.com/en-us/dotnet/api/system.diagnostics.correlationmanager)
facility.
- [Types to assist migration](https://sharpjs.github.io/Subatomix.Logging/api/Subatomix.Logging.Legacy/Sharp.Diagnostics.Logging.html)
from the [Sharp.Diagnostics.Logging](https://github.com/sharpjs/Sharp.Diagnostics.Logging)
package.
- [**Subatomix.Logging.Sql**](https://www.nuget.org/packages/Subatomix.Logging.Sql)
- [`SqlLogger`](https://sharpjs.github.io/Subatomix.Logging/api/Subatomix.Logging.Sql/Subatomix.Logging.Sql.html)
– A logger that writes to a table in SQL Server or Azure SQL Database.
## Status
[](https://github.com/sharpjs/Subatomix.Logging/actions)
Nearing release.
- **New-ish:** New implementation, but based on code with extensive private use in production.
- **Tested:** 100% coverage by automated tests.
- **Documented**ish**:**
- :white_check_mark: IntelliSense on everything.
- :white_check_mark: [External reference documentation](https://sharpjs.github.io/Subatomix.Logging/).
- :x: No tutorial content yet.
## Installation
NuGet packages are available.
Package | Status
--------|-------
[Subatomix.Logging](https://www.nuget.org/packages/Subatomix.Logging) | [](https://www.nuget.org/packages/Subatomix.Logging) [](https://www.nuget.org/packages/Subatomix.Logging)
[Subatomix.Logging.Legacy](https://www.nuget.org/packages/Subatomix.Logging.Legacy) | [](https://www.nuget.org/packages/Subatomix.Logging.Legacy) [](https://www.nuget.org/packages/Subatomix.Logging.Legacy)
[Subatomix.Logging.Sql](https://www.nuget.org/packages/Subatomix.Logging.Sql) | [](https://www.nuget.org/packages/Subatomix.Logging.Sql) [](https://www.nuget.org/packages/Subatomix.Logging.Sql)
## Building From Source
Requirements:
- Appropriate .NET SDKs — see the target framework(s) specified in each `.csproj` file.
- Download [.NET SDKs](https://dotnet.microsoft.com/download/dotnet)
- Download [.NET Framework Developer Packs](https://dotnet.microsoft.com/download/dotnet-framework)
- Visual Studio 2022 or later (if using Visual Studio).
```powershell
# The default: build and run tests
.\Make.ps1 [-Test] [-Configuration ]
# Just build; don't run tests
.\Make.ps1 -Build [-Configuration ]
# Build and run tests w/coverage
.\Make.ps1 -Coverage [-Configuration ]
```