tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Remy Maucherat <remy.mauche...@gmail.com>
Subject Re: Tomcat 5.5.4, Logging and the death of my friend localhost_log
Date Wed, 17 Nov 2004 16:01:09 GMT
On Wed, 17 Nov 2004 15:37:10 -0000, Allistair Crossley
<allistair.crossley@qas.com> wrote:
> Put simply, if you want per-web application logging, you need per-web application log4j
configuration. It's very easy to do but I do understand that those using System.out will have
to spend time refactoring. But they can stay on their <= 5.0 versions.

This is wrong: swallowOutput will log to the Context category name
using commons-logging.

                if (context.getSwallowOutput()) {
                    try {
                        SystemLogHandler.startCapture();
                        filterChain.doFilter(request.getRequest(), 
                                response.getResponse());
                    } finally {
                        String log = SystemLogHandler.stopCapture();
                        if (log != null && log.length() > 0) {
                            context.getLogger().info(log);
                        }
                    }
                } else {
                    filterChain.doFilter
                        (request.getRequest(), response.getResponse());
                }

-- 
xxxxxxxxxxxxxxxxxxxxxxxxx
Rémy Maucherat
Developer & Consultant
JBoss Group (Europe) SàRL
xxxxxxxxxxxxxxxxxxxxxxxxx

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message