I am unable to get the article you referenced.  Do I have to subscribe to Java
Pro or DevX to have access?

Thanks,
Phil

John Volkar wrote:

> Alex,
>
> I don't beleive that there is anything like this built into Log4j.  You can
> fairly easily do it yourself though.  Rather than describe it here I'll just
> point to in the right direction.
>
> Take a look at the Proxy & InvokationHandler classes.  NOTE: This is only
> available with JDK 1.3 I believe.  If you've followed a factory pattern this
> is easy to implement.  If not (if you just go and "new FooBarClass()"
> directly you'll have more work to do.
>
> Hmm, there was an article that described this, wait a minute...  Okay: the
> article's name is "Friction Free Debuging with Proxies" it at:
> http://www.java-pro.com/upload/free/features/javapro/2000/11nov00/jm0011/jm0
> 011.asp
>
> It doen't use Log4j, but it's easy enough to alter.  Take your time and read
> it, it's not too difficult to follow.  There are some caveats to using it
> ('this' pointer related)  but nothing dreadful. (Except performance!)
>
> Hope this helps
>
> John Volkar
> Senior Software Engineer II
> E-Transport, a division of Descartes (DSGX)
> [EMAIL PROTECTED]
>
> -----Original Message-----
> From: Alex Colic [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 22, 2001 9:18 AM
> To: [EMAIL PROTECTED]
> Subject: wrapper for Log4j for method entrance/exit?
>
> Hi,
>
> I am adding more debugging to my app. As my program runs I would like to
> print to a file as it enters methods and exits them. I know that at the
> beginning of the method and at the end I could do something like
>
> log("Entered method: MyMethod()");
>
> but that would be tedious.
>
> Is there some time of wrapper class that I could pass the class to in a
> constructor that as methods in the class are called, logging occurs?
>
> Thanks for any help.
>
> Alex
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
begin:vcard 
n:Miller;Philip
tel;fax:(609) 734-2662
tel;work:(609) 734-2779
x-mozilla-html:FALSE
org:Sarnoff Corporation;Advanced Video Processing
adr:;;201 Washington Road;Princeton;NJ;08543;USA
version:2.1
email;internet:[EMAIL PROTECTED]
title:MTS
end:vcard

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to