Getting an invoking method?

  • Thread starter Thread starter Trollpower
  • Start date Start date
T

Trollpower

Hello again,

today ive got a question regarding the tracing of invoking methods. I
want to write a debug class where i can write debugs to MessageBoxes
or to a file for example. But to have a more precise debuging, i want
to know the methods which calls the debugmethod. For example: Ive got
a method x in class y. If i call the debugmethod "log(string str)"
within method y (log("TEST")) i want the log-method to write "x.y:
TEST". My intention is to use the logging methods by typing the text
which has to be logged and the method puts the relevant data in front
of the text on its own. What i want from you, is a possibility to get
the methodname and classname which calls the loggingmethod.

I hope you know what i mean and you are able to give me some hints on
this...

Greets

Jens
 
You can use .net automation and write macros to insert the
correct parameter (function name) into your log call.
Messy but its something that can be done quickly.
File parsers also work well.
 
Back
Top