I put a breakpoint to the last line of code. Breakpoint is disabled. Why?
It looks like the code is excluded by some condition. The constructor of TraceSource works, and I can verify the object is OK and all listeners are OK. It really looks…
So I have an application where I will be using tracing for logging application activity/errors etc. Most information will go in a log file whereas some errors will go in event viewer too. This application will have lots of classes.
What is the best…
We have a large business application which contains multiple project all managed by a single management project.
within this management project i want to adjust the switch value of certain tracesources remotly and use DebugView to see what is…
In an application built with Visual Studio 2013 I have the TRACE constant unchecked:
From my understanding, this is supposed to mean that any call made by a System.Diagnostics.TraceSource object will not be included in the compiled code per…
Most TraceSource tracing examples show how it is done via configuration. I am trying to achieve this via code.
I have a simple assembly as follows:
using System;
using System.Diagnostics;
using System.Threading;
namespace TracingLib
{
public…
I'm currently migrating from log4net as a logging framework to the System.Diagnostics namespace in order to use 1) a .net built-in framework already available and b) use it's powerful features like activity tracing.
With log4net, I'm used to request…
I could really use a window independent of VS2012, that I can run on my other monitor, to show TraceSource messages as they are written? I realise this complicates things slightly being cross-process, but I'm sure there are many ways of just…
For all the examples I have seen of people creating a TraceSource for a class, it is always defined as static
private static TraceSource traceSource = new TraceSource("TraceSourceApp");
Why do this over
private readonly TraceSource _traceSource =…
Just to be clear, my meaning of 'aspect' is a horizontal factor of the application's functions, not intercepting all method calls as in Aspect Oriented Programming.
I have just discovered the beauty of the .NET Trace infrastructure, and in…
Our shop has a TraceListener that send events to a repository via a webservice call. We use it for our own TraceSources, but want to be able to use it for other TraceSources, like System.ServiceModel and System.Activities.
I have created a trace source in my code with a specific name, and then I want to use the section in app.config to attach a listener to it at runtime.
Here is my app.config:
…
Does Diagnostics.TraceSource support buffered logging or some other queuing mechanism?
I've no doubt come across the plethora of questions on the various logging frameworks. On many of those questions someone chimes in that "I wish people would…
% Create instrument object for Agilent oscilloscope
oscilloscope = visa('agilent', 'GPIB0::9::INSTR'); % Change the VISA address as per your oscilloscope configuration
% Set communication parameters
set(oscilloscope, 'InputBufferSize',…
I have an old application that was coded with tracing done by calling directly
new TraceSource("SourceName").TraceInformation(...). Eventually, I want to review this code and define the source as a static private element but for now I have to deal…