Defining TraceSource logging configuration for C# libraries -


I am working on shipping some libraries and I used TraceSource's to apply some diagnostic tracing I'm planning to use I also want to allow users to add / configure their own listeners, switches, filters etc.

Since the libraries did not ship with config files, is there an existing pattern that meets it neatly?

I am thinking of the following: a logging. A config file that shows from the library and shows that no audience is used in the sources used in my library. After this, in my library, I read both the user's logging.config and app.config Can I override logging.config with an audience defined in app.config file Is this sound like a fine pattern?

App Config (or the system's web diagnostic section) .config) is allowed to point to external files, such as

    

As far as I know, just one system. System Diagnostics is set to allow for the Diagnostics section, and not two that are merged. It may be possible with the ad hoc logging system (I think this is about the system.You have a tag of tracesource since the diagnostic trace library.

So you do something to your library. Different audience scenarios with config files (perhaps trace the configured section or file for pre-console trace). The user will only need to see the configsource trace in their app.config, which There is a specific scenario - to temporarily connect to a particular problem.

If the library's consumer is sophisticated enough to detect third-party libraries, then they configure their system to the Digestics section It can also be fine to do, as if they look fit, you just need some form of documentation) the user knows that you are using System.Diagnostics and Trac What are eSource names? For example, the .NET framework uses TraceSource in some namespaces (System.ServiceModel and System.Networking), but unless you run a Decompiler, you may never feel that such mark exists and active Library users can be d. In other words, the system in libraries. The diagnostic trace has a discovery ability problem.


Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -