Are there any specific uses cases where just using TraceSource will not be enough and one should consider looking into other logging libraries ( like Enterprise logging block, log4net, NLog etc)?
What I'm trying to accomplish is setting a TraceListener for a TraceSource in a referenced .dll using only the config file.
Specifically I have solution Robot which has an app.config that looks like this:
I want to log errors with System.Diagnostics.TraceSource and wonder which Listener I could use and how to configure it so that it logs to Log Files in a specified directory. A new log file should be created when the log reaches a specific size.
Is…
I've not worked with the System.Diagnostics.TraceSource package before so I want to make sure I implement it correctly. In the past I've used NLog (before that log4net) where you configure the settings in a config file (or programmatically) and in…
I need to inject a TraceSource in my application as a Dependancy Injection. How can I achieve to do that since TraceSource does not implements any interface?
I have a unit tests dll that is run using vstest.console.exe. Inside the unit tests I log some debugging information using a TraceSource. When I run the unit tests in Visual Studio, I can see the logs in the output windows, but when I run it by…
I have a DLL that's a bit on the complicated side that I'm writing tests against. Most of the classes under test have their own TraceSource object that are used to output tracing information.
namespace MyDll
{
public class Class1
{
…
I'd like System.Diagnostics.EventSchemaTraceListener to generate an unlimited set of sequential files, so I initialised one with TraceLogRetentionOption.UnlimitedSequentialFiles. However, the trace output was written to one single file rather than…
My application uses TraceSource to log events and information. Somehow it dosent work on a certain computer and writes junk data.
The log file begins with Standard ACE DB and contains all kind of weird data. It looks like this file I found on…
My project have many classes. Each class use TraceSource for logging. I don't want to use TraceEventCache while logging. Basically the answer for it is we can tell the listner to do not write TraceEventCache using TraceOptions (CallStack, ProcessID…
I've read this question and I know its possible:
Common.Logging for TraceSource
Can someone please post an example.
Also it could be helpfull if it can be configured to use the TraceSource in code instead of using the .config file.
Thanks
We have a custom TraceListener implementation which only logs when a specific object (LogMessage) is received. This all works well when using directly with the Trace.Write(object) method.
Due to Performance reason, I want to separate the Listener,…