Questions tagged [tracesource]

61 questions
0
votes
2 answers

TraceSource vs Enterprise logging block

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)?
Silverlight Student
  • 3,968
  • 10
  • 37
  • 53
0
votes
2 answers

Setting up a tracelister to a tracesource defined in assembly in a config

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:
0
votes
1 answer

Tracing for an ASP.NET application does not work in production server

I need to trace the execution of my MVC 5 application, so i have added this to web.config file:
jstuardo
  • 3,901
  • 14
  • 61
  • 136
0
votes
1 answer

ASP.Net - File logging with TraceSource

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…
magnattic
  • 12,638
  • 13
  • 62
  • 115
0
votes
1 answer

What is the correct usage of TraceSource across a solution?

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…
snappymcsnap
  • 2,050
  • 2
  • 29
  • 53
0
votes
1 answer

Injecting System.Diagnostics.Trace with Unity

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?
LoïcR
  • 4,940
  • 1
  • 34
  • 50
0
votes
1 answer

TraceSource messages not being logged to the trx file when unit tests are run by vstest.console.exe

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…
askso
  • 85
  • 8
0
votes
1 answer

Enabling trace sources in MSTest

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 { …
0
votes
1 answer

ConsoleTraceListener(Boolean) - Passing in a string

I set up a TraceListener using this XML: I then realised that the…
David Klempfner
  • 8,700
  • 20
  • 73
  • 153
0
votes
2 answers

Does setting TraceLogRetentionOption on EventSchemaTraceListener actually do anything?

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…
Jeremy
  • 2,642
  • 18
  • 36
0
votes
0 answers

Log fille from TraceSource contains "Standard ACE DB"

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…
dburner
  • 1,007
  • 7
  • 22
0
votes
1 answer

TraceSource and TraceListener quietly fail to do anything

How do I troubleshoot System.Diagnostics trace when it quietly fails to do anything at all?
MatthewMartin
  • 32,326
  • 33
  • 105
  • 164
0
votes
1 answer

Customizing TraceSource to avoid creating TraceEventCache

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…
Sudhakar B
  • 1,465
  • 9
  • 16
0
votes
1 answer

Example of using a TraceSource with Common.Logging

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
Luis
  • 1,840
  • 2
  • 14
  • 14
0
votes
1 answer

How to invoke TraceListener.Write(object) through TraceSource

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,…
Thomas Zweifel
  • 627
  • 1
  • 6
  • 19