hi all,
please help me in finding a solution::: the scenario is I have some 20
classes and each has 2 methods and those methods has
System.out.println(" some text "). i need a mechanism to turn ON/ OFF
the SOPs to be printed in the console.
I have two possible ways
1. using javaw instead of java which will bypass the console.
2. using an if condition
for eg:
class A
{
boolean a = false;
if(false)
{
System.out.println("some text");
}
}
but I need to have this IF condition check at each n every method is
there any possibility that I can have only one check that can turn
ON /OFF the SOPs
or please help me with other alternatives.
thanks in advance
}
Arne Vajhøj - 21 Apr 2007 02:57 GMT
> please help me in finding a solution::: the scenario is I have some 20
> classes and each has 2 methods and those methods has
[quoted text clipped - 18 lines]
> ON /OFF the SOPs
> or please help me with other alternatives.
Look at either java.util.logging or log4j !
Arne
Lew - 21 Apr 2007 04:26 GMT
peczcyberworld wrote:
>> class A
>> {
[quoted text clipped - 9 lines]
>> ON /OFF the SOPs
>> or please help me with other alternatives.
> Look at either java.util.logging or log4j !
And perhaps apache commons-logging in conjunction with either of those.

Signature
Lew
Knute Johnson - 21 Apr 2007 04:13 GMT
> hi all,
>
[quoted text clipped - 24 lines]
>
> }
System.setOut(new PrintStream("nul)); // windows
System.setOut(new PrintStream("/dev/nul")); // linux

Signature
Knute Johnson
email s/nospam/knute/
Z. - 21 Apr 2007 05:05 GMT
> but I need to have this IF condition check at each n every method is
> there any possibility that I can have only one check that can turn
> ON /OFF the SOPs
> or please help me with other alternatives.
See System.setOut();