NTrace 0.4.0.46
See the version list below for details.
dotnet add package NTrace --version 0.4.0.46
NuGet\Install-Package NTrace -Version 0.4.0.46
<PackageReference Include="NTrace" Version="0.4.0.46" />
paket add NTrace --version 0.4.0.46
#r "nuget: NTrace, 0.4.0.46"
// Install NTrace as a Cake Addin #addin nuget:?package=NTrace&version=0.4.0.46 // Install NTrace as a Cake Tool #tool nuget:?package=NTrace&version=0.4.0.46
Introduction
Trace
is a trace management for logging operations in .NET.
Its purpose is to encapsulate trace operations for different locations (e.g. console, file etc.). In addition trace messages can be categorized to be filtered at application level. The following sections show the details
Trace Service Management
The core component is the trace management service which controls registered tracers and handles also the categories. Only messages matching the wanted categories will be processed by each known tracer
Register Tracers
Initially no tracers are known to the service. To associate a tracer it has to be registered. This is a task that is done at the very beginning of each application. A tracer has to implement the ITracer
interface.
In the current release there are only a few build-in tracers available. This will grow in the future.
Build-In Tracers
For the current release there are the following build-in tracers available:
- ConsoleTracer
- FileTracer
Tracer-Adapters
In the next release there will also be a support for adapting external trace handlers like NLog
Trace Types
A message can be traced of a specific type, like:
- Error
- Warning
- Information
Trace Categories
To control the purpose of a traced message, it can be assigned a specific category. The following categories are available right now:
- Application
- Connection
- Method
- Data
- Query
- Debug
At application level, these categories can be combined (e.g. Data | Query) where you only want to see those data in you log to keep it clean. But if writing an error, the message will be traced, regardless of the filtered category.
IoC Support
NTrace
is designed for the use in an IoC (Inversion of Control scenario) environment. For that it provides an interface ITraceService
.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net461 is compatible. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
This package has no dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on NTrace:
Package | Downloads |
---|---|
NTrace.Adapters.NLog
NLog Adapter for NTrace |
GitHub repositories
This package is not used by any popular GitHub repositories.
Features:
- [#55] - Improve Method Tracing Output