473,396 Members | 2,011 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.

Custom trace listener

alx
I want to create trace lister where one application (A) listening to
another application (B). Application A should attach to application B
and listening to events. Like SQL Profiler.

Early I have realized this scenario using COM+ loosely coupled events.
But maybe .NET have special mechanisms to do this.

Thanks

Nov 17 '05 #1
5 2194
Hi,

You can create this behaviour putting the trace objects in a separete DLL
and publish them as static. So several applications can have access to them,
this is how SQL server profiler works.

cheers
Salva
"alx" wrote:
I want to create trace lister where one application (A) listening to
another application (B). Application A should attach to application B
and listening to events. Like SQL Profiler.

Early I have realized this scenario using COM+ loosely coupled events.
But maybe .NET have special mechanisms to do this.

Thanks

Nov 17 '05 #2
alx
Hi

Salvador wrote:
You can create this behaviour putting the trace objects in a separete DLL and publish them as static. So several applications can have access to them, this is how SQL server profiler works.


Thanks for your answer, but what does it mean "publish them as static"?

Nov 17 '05 #3
Hi,

Publish the trace object as Static so all the instances share the same
object. I think is called "Shared" on VB.NET

public class yourTrece
{
private static ..... (your trace)

public static void Log (string text)
{
(yourTrace).WriteLine(Text)
}
}

So if you connect you can sneak what your trace object is doing.

Regards
Salva

"alx" wrote:
Hi

Salvador wrote:
You can create this behaviour putting the trace objects in a separete

DLL
and publish them as static. So several applications can have access

to them,
this is how SQL server profiler works.


Thanks for your answer, but what does it mean "publish them as static"?

Nov 17 '05 #4
alx

Salvador wrote:
Hi,

Publish the trace object as Static so all the instances share the same object. I think is called "Shared" on VB.NET


It doesn't work because applications are running in different processes
and each process loaded its own copy of the 'static dll'.

Nov 17 '05 #5
alx
It doesn't work because applications are running in different processes
and each process load its own copy of the 'static dll'.

Nov 17 '05 #6

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

Similar topics

8
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",...
2
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",...
3
by: Schorschi | last post by:
Ok, can someone point out to me why the following code does not work? In compiles, no errors, but MemoryStream never seems to receive any data? Dim theMemory As MemoryStream, _ theListener As...
2
by: Jason L James | last post by:
Hi all, can anyone help me with some tracing I am trying to do in my application. I have a configuration file containing the XML as detailed below: <?xml version="1.0" encoding="utf-8" ?>...
7
by: amitos | last post by:
Hi! I consider using the Logging Application Block, Enterprise Library, Jan 2006 in a major project. To date, I've found that some of its features are not very well documented. One important...
0
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...
0
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...
0
by: Smokey Grindle | last post by:
What is the scope of a trace listener? If I add a trace listener at my application level, then it references some DLL's I also wrote and calls their functions will those DLL's have the same trace...
0
by: Alexander Vasilevsky | last post by:
There is a problem: We need to redirect the contents LogEntry through class inherited from the Control CustomTraceListener somewhere on the form. Accordingly, the code itself does not create object...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: 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
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
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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,...
0
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...

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.