Re: Access Log /Filter/?

2010-03-03 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Xie, On 3/2/2010 6:20 PM, Xie Xiaodong wrote: Second, you are absolutely right about the log.info(). I first wrote like this for testing and forgot to get it back to debug level. Don't forget that calling log.debug() with a bunch of string

Re: Access Log /Filter/?

2010-03-03 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jason, On 3/2/2010 7:21 PM, Jason Brittain wrote: Why does the request have to be an HTTP request in order to have the access log run? That does seem to be a bug. Note that this is not actually a part of the AccessLogValve, it's just part of

Re: Access Log /Filter/?

2010-03-03 Thread Xie Xiaodong
Hello, I think log.debug() method should first check current logging levels, or our code will have those if() {} template everywhere. I checked java.util.logging.Logger, and found this: public void log(Level level, String msg, Object param1) { if (level.intValue() levelValue || levelValue

Re: Access Log /Filter/?

2010-03-03 Thread Xie Xiaodong
Hello, Christopher, For log.debug() part, seems I misunderstood your meaning. Sorry about that, you are right. But I do not think it matters too much. :) On Wed, Mar 3, 2010 at 5:54 PM, Xie Xiaodong xxd82...@gmail.com wrote: Hello, I think log.debug() method should first check current

RE: Access Log /Filter/?

2010-03-03 Thread Caldarale, Charles R
From: Xie Xiaodong [mailto:xxd82...@gmail.com] Subject: Re: Access Log /Filter/? http://www.javalobby.org/java/forums/t88518.html I think you're cherry-picking the data. The most useful comment about StringBuilder in that thread was this: Re: StringBuffer Thus, the performance of the two

Re: Access Log /Filter/?

2010-03-03 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Xie, On 3/3/2010 11:54 AM, Xie Xiaodong wrote: I think log.debug() method should first check current logging levels, or our code will have those if() {} template everywhere. [snip] For log.debug() part, seems I misunderstood your meaning. Sorry

Re: Access Log /Filter/?

2010-03-02 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Xie, On 2/26/2010 4:33 PM, Xie Xiaodong wrote: No, there is no AccessLogFilter in Tomcat 7 for now. I've got my version of AccessLogFilter during Google Summer Code 2009, but has not yet submit it for some reason. Uh, why not submit it and get

Re: Access Log /Filter/?

2010-03-02 Thread Xie Xiaodong
Hello, Christopher, I submitted some code but not including the AccessLogFilter since I had something question about the implementation of it. Here I give you the version I wrote last summer. Hope you could check it and submit a patch. On Tue, Mar 2, 2010 at 6:41 PM, Christopher Schultz

Re: Access Log /Filter/?

2010-03-02 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Xie (or is it Xiaodong?), On 3/2/2010 2:57 PM, Xie Xiaodong wrote: I submitted some code but not including the AccessLogFilter since I had something question about the implementation of it. Here I give you the version I wrote last summer. Hope you

Re: Access Log /Filter/?

2010-03-02 Thread Xie Xiaodong
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 *

Re: Access Log /Filter/?

2010-03-02 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Xie, On 3/2/2010 3:58 PM, Xie Xiaodong wrote: public class AccessLogFilter extends FilterBase { For the most part, you've just replaced the invoke() method with a doFilter() method and introduced init(), which calls start(). Then, you removed

Re: Access Log /Filter/?

2010-03-02 Thread Xie Xiaodong
Thank the comments. I should have rechecked this file before I sent it here. :) First, for the init() part: in the super class FilterBase, we have a init() method which will do the initialization work you mentioned. Second, you are absolutely right about the log.info(). I first wrote like

Re: Access Log /Filter/?

2010-03-02 Thread Jason Brittain
Hi Christopher. On Tue, Mar 2, 2010 at 2:51 PM, Christopher Schultz ch...@christopherschultz.net wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Xie, [snip] if (!isHttpServlet(request, response)) { chain.doFilter(request, response); return; }

Access Log /Filter/?

2010-02-26 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 All, I just started to write a filter that did request timing logging, and I looked at AccessLogValve for inspiration for how to parse a log pattern and then spit it out for every request. I realized that AccessLogValve can actually do everything I

Re: Access Log /Filter/?

2010-02-26 Thread Xie Xiaodong
Hello, Christopher, No, there is no AccessLogFilter in Tomcat 7 for now. I've got my version of AccessLogFilter during Google Summer Code 2009, but has not yet submit it for some reason. Please attach your version so we could discuss it and make an AccessLogFilter in Tomcat 7. On Fri, Feb 26,