in Yu
-Original Message-
From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 19, 2001 7:09 PM
To: [EMAIL PROTECTED]
Subject: Re: [TC4.0] Disabling debug output...
On Thu, 19 Jul 2001, Jonathan Reichhold wrote:
> > This hack definitely works. As long as you're wi
On Thu, Jul 19, 2001 at 01:43:32PM -0700, Jonathan Reichhold wrote:
> Actually I've got a thought on how to add in debug messages without recompiling.
>For a horrible hack say I've got a java class
> like:
>
> //Constants.java
> public class Constants{
> public static boolean isDebug(){retu
Craig wrote:
> - The typical approach with the JSR47 API or with Log4J is to let the
> logger decide whether to really output the message or not. So, you
> would instrument your code with things like (conceptual, not real API):
>
> logger.log("The object is " + myObject, Logger.DEBUG);
On Thu, 19 Jul 2001, Jonathan Reichhold wrote:
> > This hack definitely works. As long as you're willing to pay the overhead
> > for the method call, it's essentially equivalent to asking Log4J whether
> > or not debugging output is enabled, which does something similar (but asks
> > the insta
> This hack definitely works. As long as you're willing to pay the overhead
> for the method call, it's essentially equivalent to asking Log4J whether
> or not debugging output is enabled, which does something similar (but asks
> the instantiated logger object, instead of being a static method).
-- Original Message -
> From: "Pier P. Fumagalli" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, July 19, 2001 1:24 PM
> Subject: Re: [TC4.0] Disabling debug output...
>
>
> > Craig R. McClanahan at [EMAIL PROTECTED] wrote:
> > &
fer flags/config files to turn stuff
like this on/off, but it is a relatively quick
hack...
Jonathan
- Original Message -
From: "Pier P. Fumagalli" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, July 19, 2001 1:24 PM
Subject: Re: [TC4.0] Disabling de
Craig R. McClanahan at [EMAIL PROTECTED] wrote:
>
> - However, Pier's proposed approach doesn't deal with a need that I've
> experienced regularly -- the need to turn on debugging messages
> dynamically on an existing component, *without* recompiling it. This
> is NOT simply aesthetics; either y
On Thu, 19 Jul 2001, Mark Abbott wrote:
> [snip]
> These are specifically the sort of problems the new java.util.logging
> package in
> JDK 1.4 is addressing. I believe the philosophy there is to always leave the
> code in place, be liberal in writing tracing log calls and assume that
> integ
I believe the Java Language Spec makes specific requirements on the
order of evaluation of static finals to facilitate this kind of usage. In
the past I have
gone so far as to compile test programs and disassemble the byte code
and on every JVM I have ever tried, code wrapped in if statements tha
Craig R. McClanahan at [EMAIL PROTECTED] wrote:
>
> In trivial experiments a long while back, I seem to recall that this trick
> worked if your constant was "static final". But I haven't looked lately.
Yep... Setting a public static final boolean DEBUG = true/false; will behave
like an ifdef in
On Wed, 18 Jul 2001, Justin Erenkrantz wrote:
> On Thu, Jul 19, 2001 at 12:16:27AM +0100, Pier P. Fumagalli wrote:
> > Checking out the source code, I see a lot of // (commented out lines) when
> > debug() is supposed to be called...
> > Can't we have a global constant boolean called DEBUG and
On Thu, Jul 19, 2001 at 12:16:27AM +0100, Pier P. Fumagalli wrote:
> Checking out the source code, I see a lot of // (commented out lines) when
> debug() is supposed to be called...
> Can't we have a global constant boolean called DEBUG and replace the // with
> if (DEBUG), so that we can simply c
Rob S. at [EMAIL PROTECTED] wrote:
>> Check out org.apache.catalina.connector.warp.Constants and
>> WarpLogger... Old
>> trick we used in JServ. :)
>
> Is Log4j not a good idea? I've used it for a couple of months, seems pretty
> cool =) Too much for TC?
I believe the integration with Log4J i
> Check out org.apache.catalina.connector.warp.Constants and
> WarpLogger... Old
> trick we used in JServ. :)
Is Log4j not a good idea? I've used it for a couple of months, seems pretty
cool =) Too much for TC?
- r
15 matches
Mail list logo