This project has moved. For the latest updates, please go here.
1
Vote

Add NamespaceTraceSource<T> that uses the class namespace

description

Also maybe a ClassTraceSource<T> that registers one trace source per class.

Note, however, that System.Diagnostics does not have hierarchical configuration, so each trace source needs to be turned on/off independently. e.g. if you have 125 classes, you need 125 switches.

In contrast, with 25 namespace scopes you would need 25 switches; and with 5 assemblies you would need 5 switches.

comments

zijianhuang wrote Jun 10 at 4:50 AM

I had offered something similar in this article: https://www.codeproject.com/Tips/1071853/Use-TraceSource-Efficiently

Currently it covers assembly trace through static class AssemblyTrace.

It shouldn't be hard to cover namespace.

Up to the market demand.