Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Logging method call

 
mehdi elaoufir
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everybody!
To debug a java program, i want to log the current running method by doing something like this:
<pre>
<code>
class Foo {
public void testMethod(Param1 p1, Param2 p2){
this.outputCurrentMethod();
.
.
.
return;
}
.
.
.
}
</code>
</pre>

The output would be something like this :

Current Method: Foo.testMethod(Param1 p1, Param2 p2)

Parameters list:

p1:value1

p2:value2

Can anybody help me?
thanx a lot

[This message has been edited by mehdi elaoufir (edited October 19, 2001).]
 
vicky bawge
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
check out Log4J from apache. morever its free
-Vivek
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic