Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / First Aid / June 2007

Tip: Looking for answers? Try searching our database.

lew? 2 qq

Thread view: 
beelzibub @ bawston school for idiots - 15 Jun 2007 23:14 GMT
1 why not just catch the error then write it to std.err so if your
program does dump there is written for you to debug by?

2 my program runs fine but the spinners(i have 3), when you clik to
advance one it goes way up, almost infinite.

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.

Lew - 16 Jun 2007 00:03 GMT
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.



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.