473,516 Members | 3,248 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Trace.WriteXXX vs Listener.WriteXXX

What issues should I consider when deciding to use one or the other?

--
There are 10 kinds of people. Those who understand binary and those who
don't.

http://code.acadx.com
(Pull the pin to reply)
Nov 15 '05 #1
1 1103
Frank,
I'm not see a Listener.WriteXXX per se, do you mean TraceListener.WriteXXX?

I would "always" use Trace.WriteXXX, as my understanding is
TraceListener.WriteXXX is an implementation detail of Trace.WriteXXX &
Debug.WriteXXX.

The only time I would use TraceListener.WriteXXX is when I was implementing
a new Listener class. Or implementing my own Trace or Debug like class.

Hope this helps
Jay

"Frank Oquendo" <fr*******@acadx.com> wrote in message
news:em**************@tk2msftngp13.phx.gbl...
What issues should I consider when deciding to use one or the other?

--
There are 10 kinds of people. Those who understand binary and those who
don't.

http://code.acadx.com
(Pull the pin to reply)

Nov 15 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
3733
by: Geopsaros | last post by:
Hi! I have created a custom trace Listener class, called "DBTraceListener" it works fine when i add it manually in code : (eg. Trace.listeners.add(new DBTraceListener("myDBListener", TraceLevel.Verbose, getDBConnection) ) What I'm trying to achieve now is to add this listener via the MyApplication.exe.config file
2
2363
by: Ken | last post by:
I would like to start using EventLogTraceListener, and am running into a couple of significant limitations: 1) I have found that there is no way to write EventLog entries with different EventLogEntryTypes. It seems that EventLogTraceListener is only capable of writing entries with EventLogEventType.Informat­ion, even for Trace.Fail. Is this...
2
5302
by: S. Han | last post by:
I use Trace.Assert() through out my app and it's such a great way to debug a program. My question is is there any way to redirect the assertion pop-up to the command line output in my console application?
2
3681
by: Richard | last post by:
Hi, I'm having trouble setting up a config file based trace switch & listener. I added an application config file to my console based C# program using the "Add New Application Config File" button from solution explorer. My config file is composed of the following, which is almost a verbatum cut & paste from MSDN help: ...
2
1649
by: Jason | last post by:
Hi, I'm a little confused on using a trace listener. I'm doing this (winforms app btw not web app) TextWriterTraceListener listener = new TextWriterTraceListener("TraceOutput.txt", "filetrace"); Trace.Listeners.Add(listener); Trace.WriteLine("Starting My Program ")
0
1209
by: martin | last post by:
Hi, I have created an asp.net application as a project, and also another project that is just a class library. My asp.net application calls a function in the class library. I am attempting to place instrumentation inside the function of my class library to write to a text file, I am using an TextWriterTraceListener object.. The problem...
1
1290
by: Atara | last post by:
Can I view Trace output when launching a win forms application OUTSIDE of the ide? e.g. using switches in the configuration file? Must I declare a trace listener? Thanks Atara.
0
1228
by: Blake | last post by:
I am trying to make a trace listener textbox that behaves like the output window in VS, in that it shows trace messages from all trace sources. I created my own listener to write to a textbox and added this listener to the trace.listeners collection but it will recieve messages sent via the normal trace class. Messages from other...
0
2002
by: boldtbanan | last post by:
I've created a custom trace listener which I'd like to initialize in the web.config file of my application. I noticed that I can use the initializeData attribute to pass a string to the constructor of my custom trace listener, but is there any way to pass multiple parameters to the constructor through the web.config initialization? For...
0
7273
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7182
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7405
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7547
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5712
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5106
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
4769
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3265
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3252
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.