Your question is now becoming a lot more logging-in-general oriented where it was about logging from webapps before. I suggest you look to the experts on the log4j-user list or, better yet, buy the book on using log4j:

http://www.qos.ch/shop/products/clm_t.jsp

This is loaded with information and I highly recommend getting it. It will answer most, if not all, of your logging questions.

Jake

At 09:27 AM 2/20/2003 -0800, you wrote:
Without an intent to offend anyone, I'd say majority of the posts were
centered around what tools to use, rather than the best practices itself
(apart from the posts of Jacob and Peter Lin).

So, from what I understand:
1. Web applications written using tomcat should have the logging path
configurable (via the parameters in the web.xml, for example) - since the
webapp can be run directly from the .war archive. And Steve had a remark
about not being able to have configurable files inside the jar.
2. While logging to a directory inside the webapp structure, its a good
practice to check context.getRealPath("/") returns non-null first.
3. Keep an alternative - so when logging to your file fails, use
ServletContext.log(string) to send the message string to application log.

What about, like Peter mentioned (but did not quite elaborate) log rotation?
report generation based on logs? log backups? Also guidelines for the
developers to separate the log messages that are errors, and log messages
that are produced by the application as indications of the outcome of some
task?

Thanks,
Manav.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to