axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aleksander Slominski <>
Subject Re: [AXIS - PATCH] More logging changes
Date Sat, 23 Feb 2002 03:36:37 GMT
Russell Butek wrote:

> This is why I said Richard ALMOST convinced me.  Sure, log.debug is shorter
> to type than System.out.println.  But in order to use it I have to turn
> debugging on, and grep for my stuff in a potentially huge pile of output.
> And then when I'm done I have to remember to turn debugging back off so I
> don't accidentally commit my stuff with it turned on.  System.out.println
> sounds a whole lot easier.


there is a potential solution to this: allow runtime option to be specified that
will control what debug output is needed (by default all off). i have implemented
such approach in my minilogger that works as follow - if you run this:

    java -Dlog=foo:ALL foo.Foo

that will turn logging only for package "foo" and all its sub packages for all
levels (such as "").

more flexibility is allowed:

    java -Dlog=:SEVERE,foo:FINE, foo.Foo

it is interpreted as to show only log levels higher or equal to SEVERE for all
loggers but for "foo" and sub packages to show log level equal and higher than FINE
(that includes "" and "foo.izzy". finally if logger has name "*" all
logging will be shown.

i found it extremely useful and very fast to change. be default all logging is off
so it is also very convenient to run tests etc.

for more details on syntax and more samples see documentation at:
and if you are interested in  the code that is doing parsing of command line
parameter - it is located in (available also online at

if you find it useful feel free to use it.



View raw message