
Signature
Sometimes I'm in a good mood.
Sometimes I'm in a bad mood.
When all my moods have cum to pass
i hope they bury me upside down
so the world can kiss me porcelain,
white, Irish bottom.
I do not know this word "qq".
> 1 why not just catch the error then write it to std.err [sic] so if your
> program does dump there is written for you to debug by?
This is a good question. Logging utilities are much more flexible. stderr is
just one channel, and not an especially good one for things like Web servers.
Everyone writes to the same channel, and the logging overhead to stderr is
incurred with every call; that can have an adverse impact on performance.
Furthermore, it is inflexible: you have to invent your own formats,
disentangle all the output from multiple sources, disentangle important output
from less so, and you can't selectively suppress some log output and not other.
With a library such as log4j, you have very good control. You can suppress
logging output "below" a certain level of granularity for most stuff most of
the time; that means you might log only "SEVERE" or "ERROR" level messages in
production. All less critical messages ("WARNING", "DEBUG", etc.) not only
are not emitted, they have negligible impact on production performance. Only
messages that are emitted cause overhead.
Furthermore, you can have different parts of the system log at different
levels. For example, if one web service class is troublesome, you crank up
its logging level to DEBUG but leave everyone else ERROR only.
Not only that, you can log each program, each class, even each method to
separate outputs should you choose. You can even simultaneously log to
multiple outputs, such as the stdout stream and a named log file. You can
even log to a database. But wait, there's more. Logging is configurable at
deployment time via an external resource file, so you don't even have to
hard-code all that control. This includes formatting and built-in handling of
multiple threads.
Logging is as superior to System.err output (or, shudder, System.out) as a
Ferrari is to a VW.
> 2 my program runs fine but the spinners(i have 3), when you clik to
> advance one it goes way up, almost infinite.
Congratulations.
BTW, how close to infinite do you have to get to be "almost" there?

Signature
Lew
beelzibub @ bawston school for idiots - 19 Jun 2007 23:31 GMT
> BTW, how close to infinite do you have to get to be "almost" there?
... why, infinity - 1 , of course.
(spinners fixed)
b

Signature
Sometimes I'm in a good mood.
Sometimes I'm in a bad mood.
When all my moods have cum to pass
i hope they bury me upside down
so the world can kiss me porcelain,
white, Irish bottom.