Re: System.out is repeating the output
Re: System.out is repeating the output
- Subject: Re: System.out is repeating the output
- From: Nathan Dumar <email@hidden>
- Date: Tue, 16 Nov 2004 15:56:21 -0500
Kieran,
Thanks for this tip. I'm looking into it now, and it looks good so far. Unless someone pipes up with a simple fix for the work I've already done, I'll be heading in this direction.
Now that I'm considering log4j, I've found quite a bit of documentation to help me along. I found next to nothing for my previous direction.
On Nov 16, 2004, at 12:59 PM, Kieran Kelleher wrote:
While I am certainly no expert at log4j, it seems that log4j does exactly what you want, even selectively for different types of errors. I just use it for logging debug stuff during development to a file which was pretty simple to setup. Log4j allows you to specify various output streams for differnt types and levels of log messages (file, rolling file, database, SMTP, etc.). One way to configure logging is in a log4j properties text file which you initialize in Application constructor. After that you just create an instance of Logger in each class and use log.debug("message", optional throwable), log.info(...), log.warn(...), etc. statements to output the messages to the logger framework which uses the properties in your configuration file to determine where the messages go (a file, SMTP, etc.). Plus for deployment, you can change the properties file to stop or minimize the cpu-hogging-logging !
What I am working toward is a deployment exception logging solution, because my app will be on a commercial server, and I won't be able to check the console to see if bad things have happened. I'm doing the best I can to make a good, stable application, but being only one, and new, I know there will be problems that I haven't thought of or tested for. I want to know about them right away so I can fix them ASAP. Having exceptions emailed to me seemed like the best solution. At this point, log4j seems like the easiest way to get this done.
For more info see here:
http://logging.apache.org/log4j/docs/manual.html
http://logging.apache.org/log4j/docs/api/index.html
http://logging.apache.org/log4j/docs/index.html
And Practical WO, pg 22. I wish I had seen that earlier, but then, I wasn't considering log4j earlier, so I might have paid no attention to it.
Regards, Kieran
Thanks again Kieran.
Nathan
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden