Thomas SMETS
Posts: 307
Nickname: tsmets
Registered: Apr, 2002
|
|
Re: Redirecting System.out.println
|
Posted: Apr 6, 2002 4:14 AM
|
|
> > By the way, the original question was about > redirecting System.out to a file; I would guess that > this wouldn't be for debugging purposes, since it > would be hard to debug if you can't see what's going > on until the program completed execution. But you > never know. >
Well I believe(d) the redirection is to Monitor the application running. It's to me part of the debugging 'cause if you were 100 % sure of your app you would not need to monitor it, he !
Just a question of point of view I suppose
> > As of version 1.4, the Java API has a logging facility, so I'd use that if I wanted to do some > logging. This Log4j seems to be aimed at debugging; these days the debugging tools for Java a getting > pretty good, so I'd recommend using a real debugging tool. IDEs like IntelliJ IDEA, Borland JBuilder, > Forte for Java and NetBeans (which is free a open source IDE) all have nice debugging facilities, some > including remote debugging of container code. If, for some reason, it was impossible to use a real > debugger, it might be worth considering a code generator that runs in the build process (only for > the debug version) that inserts the debug logging statements before compiling (in a temporary > hierarchy, of course, so as not to affect the source code). >
Yea, sure ... but Log4J has been out for some times now & it's pretty stable. Also, I don't see why Logging should be part of the language "specs". It's really smthg outside the language scope so ... Also if a product like JBoss (http://www.jboss.org) uses Log4J it probably means that it's still better than any thing else, then ...
Log4J is not for debugging, though it may help a lot ! Log4J is for Logging. You may sometimes need Logging to debugg but there certainly no way of getting confused between Logging & Debugging. It's like thinking that Unit testing is for debugging...
I am mentionning that cause I had an argument with a blonde CTO who could not make the difference :-D I hope you are not ? Nothing personnal, he
Out of scope I would prefere Sun to fix the Multi-threading problem instead of dealing with solved matters.
> > Finally what does it mean to "gain a lot of assless?" >
Ooops, I am not a native english (I took english as a third language in Secondary school so my apologies for this typo). I mean(t): It would spare you a lot of assless, though the second steps are sometimes a little bit hard.
|
|