473,388 Members | 906 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

Retrieving initializeData attribute from TextWriterTraceListener

I set up a TextWriterTraceListener in the App.config file. I'd like to be
able to tell, programmatically, which file it's using. However, I don't seem
to be able to get at the initializeData attribute. The Attribute collection
attached to the TextWriterTraceListener is empty.

Any ideas as to how I might get at this file name without having to parse
App.config?

Apr 4 '08 #1
2 2628
config is largely for things that are known... if you need to do this on
the fly, then try:

Trace.Listeners.Add(new TextWriterTraceListener(path));

Marc
Apr 4 '08 #2

Sorry - I may have misunderstood the question. I suspect you'll struggle
to do this the other way around (i.e. find the file from the listener) -
sorry.

Marc
Apr 4 '08 #3

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

Similar topics

1
by: Walter L. Williams | last post by:
I have defined my own IntegerRangeAttribute which is used like so: private Int32 iNumBurnInIterations = 2000; At another point I want to get at that information, ie: public Int32...
8
by: CJM | last post by:
I'm trying to retrieve the users email address via ADSI in ASP. So far, I have the following code: Set oUser = GetObject("WinNT://domain/" & Request.Form("UID") & ",user") Response.Write...
0
by: Kurt Ng | last post by:
Hi, y'all. I am working on retrieving file version info on a third party dll. I have used the FileVersionInfo class to retrieve all of the standard version information already such as...
0
by: Pete W | last post by:
I have a console application for which I have atttemped to use TextWriterTraceListener. The app uses System.Diagnostic I want to trace or debug to Console and also to file. code in Main()...
3
by: melanieab | last post by:
Hi, I can't seem to get the syntax correct. I have an xmlnodelist full of elements called "file". Each file has an attribute called "ID". If I just want to get, say, the ID of the second file...
3
by: Frustrated Newbie via DotNetMonster.com | last post by:
I need to get the values of an attribute of each of three objects that I've stored in an arraylist. Each object has three values, and one of those values is an integer. I'm able to "get" the...
3
by: Mark R. Dawson | last post by:
Hi all, I am trying to get custom attributes from a property. I can do this if I pass in the name of the property i.e. "Name" to the reflection methods, but if I pass in set_Name which is what...
3
by: gslim | last post by:
I have created a trace listener and would like to give it a variable so that when it is installed on a machine I have no control over it can still find its logfile. Right now they are hardcoded as...
0
by: WT | last post by:
Hello, Using a custom tracelistener inherited from TextWriterTraceListener, I have problems on a server. No trace file is created and no trace are written. I try our normal program based...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.