473,396 Members | 2,036 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,396 software developers and data experts.

Console trace and multiple program instances...

At present I'm generating a log file during program execution by creating a
console log trace and sending it to an external file thus:

Debug.Listeners.Add(New TextWriterTraceListener(Console.Out))
Debug.Listeners.Add(New TextWriterTraceListener(Application.UserAppDataPat h
+ "\log.txt", "log file"))
Now a good feature here is that if "log.txt" already exists and is in use
(for example when I have multiple instances of the client running), the
TextWriterTraceListener automatically creates a unique filename and appends
"log.txt" to the end of it, i.e.:
"529f6441-14f6-4628-aead-cf6eea410c40log.txt". The problem though is that I
don't know the name of the log file for the second instance, so I cannot
implement a log file viewer within my application that reads anything other
than the first instance ("log.txt"). I can't find a property on the
TextWriterTraceListener class that would tell me the path it is writing to.

Perhaps it is using a per-instance GUID to generate the unique name. Can I
access this GUID anywhere?
Thanks,

Robin

Oct 9 '06 #1
0 966

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

Similar topics

11
by: Mike | last post by:
Looking to find any information on how to properly configure multiple instances of DB2. This is on Win2k db2 ver 7.2. I am basically looking for information on how the multiple instance settings...
2
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...
0
by: Glen | last post by:
I'm working on creating wrappers for utilities that appear to have operational issues when running multiple instances of the process at the same time. To fix this issue, I want to implement a...
1
by: Falo | last post by:
I've seen GUIs for console applications where the console window is hidden. How is this done, and how is the GUI app "tied" to the console app? That is, I know how to pass commands to an app at...
11
by: Clark Stevens | last post by:
I just finished a WinForms app in VB.NET. I want to allow the user to be able to run multiple instances of the program like you can with Notepad and Wordpad. The way it is now, once I run the...
5
by: Tim Werth | last post by:
I have a .NET console application that is kicked off by a .NET Windows service. They communicate via .NET Remoting, although there isn't much communication between the two while the console app is...
3
by: Andrew Ducker | last post by:
We were using Console.Writeline from within our app, to do some routine debugging. And then we started having random problems when the code was run by a tester, on their own machine. We...
1
by: sunil | last post by:
Hello All. I have written a program as an exe that performs some kind of order processing. The program is first configured and then started manually. I have have multiple instances of this...
1
by: mquincey | last post by:
One of the features offered by .NET 2.0 is the use of the TraceSource class. In an attempt to demonstrate its use, I wanted to run my test under the following conditions: 1. Use TraceSource class...
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: 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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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...
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
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...
0
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,...

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.