Thanks for the response Shapira.

My comments on your comments are below.


Shapira, Yoav wrote:

>* The app server will handle log buffering so that log
> messages are only written to disk every X seconds, where
> X is a configurable log-flush-interval value.
This is not required by the servlet spec. It is up to the container implementation. Have you seen one that makes X configurable??

Turns out, you are correct. Neither Weblogic or Websphere allow
you to set the log-buffer-flush interval. The HAHTsite app server
allows you to do this and I assumed that it was a common feature.

>* The app server will handle log rotation so that log
> files are renamed or deleted every Y seconds or log files
> are not allowed to grow beyound some size Z.
Both are optional, not mandated. I haven't seen a container that does size-based rollover yet, only time. And it's hardly ever configurable.

Both Websphere and Weblogic allow you to set the max size
for log files. So yes, they support file-size based rollover.

>* You can use the app server's Administrative UI to view
>  log files on distributed servers without having to telnet
>  to or otherwise visit each server.

True.

This is a pretty important feature.

>1) are the above points valid points?
Not really.  Because they're not standard across containers.

Logging to ServletContext.log() is standard accross
containers. The actual configuration of logging is not
standard but is transparent to application programmers.

So, if there was a ServletContextAppender you would not
be able to configure it in the same nice way as other
Log4J appenders - you'd have to configure logging via
the app server admin UI.

>3) if no ServletContextAppender exists, then why?

Not as part of the log4j core distribution.
Because log4j offers everything the servlet container logs do, and much more. You can use remote (e.g. Socket or JMS) appenders, and associated log4j (or any, really, if you use an XMLLayout) viewers to view logs remotely. You can configure nearly everything.

I see your point, but I think a ServletContextAppender
would be a nice addition. Especially for those admins who
live inside the Weblogic/Websphere world and know only
about the admin tools provided by their app server vendor.

Thanks again. I think I understand the trade-offs better now.

- Dave




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

Reply via email to