You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by André Warnier <aw...@ice-sa.com> on 2011/07/21 00:22:14 UTC

ExtendedAccessLogValve, documentation

Hi.

I just looked at this, and have the following questions/suggestions :

1) suffix	

The suffix added to the end of each log file's name. If not specified, the default value 
is "". To specify no suffix, use a zero-length string.

(or do not specify it, which is then the same, right ?)

Suggestion:
The suffix added to the end of each log file's name. The default value is "" (a 
zero-length string), meaning that no suffix will be added.

2) condition	

current:
Turns on conditional logging. If set, requests will be logged only if 
ServletRequest.getAttribute() is null. For example, if this value is set to junk, then a 
particular request will only be logged if ServletRequest.getAttribute("junk") == null. The 
use of Filters is an easy way to set/unset the attribute in the ServletRequest on many 
different requests.

suggestion:
Intuitively, should it not be the opposite ?
Like, if (condition="junk"), then the request will only be logged if 
ServletRequest.getAttribute("junk") != null ?

I mean, the name "condition" intuitively translates to "if this condition is met", and if 
one says
condition="log"
one would intuitively expect that the line will be logged if the "log" attribute is true 
(non-null), and not logged if the request attribute "log" is false (undefined,null).  Or 
is this my perl-centric thinking ?


Additionally :
Would it not be nice if this attribute would accept a list of conditions, like :
condition="attrib1,attrib2,attrib3"
meaning that the request will be logged if
((ServletRequest.getAttribute("attrib1") != null)
    || (ServletRequest.getAttribute("attrib2") != null)
    || (ServletRequest.getAttribute("attrib3") != null)
)



3) further down :

For any of the x-H(XXX) the following method will be called from the HttpServletRequestObject:
...
x-H(requestedSessionId): getGequestedSessionId      (typo ?)

A.

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


Re: ExtendedAccessLogValve, documentation

Posted by Konstantin Kolinko <kn...@gmail.com>.
2011/7/21 André Warnier <aw...@ice-sa.com>:
> Hi.
>
> I just looked at this, and have the following questions/suggestions :
>
> 1) suffix
> 3) x-H(requestedSessionId): getGequestedSessionId      (typo ?)

Fixed in r1149104.


> 2) condition
>
> current:
> Turns on conditional logging. (...)
> suggestion:
> Intuitively, should it not be the opposite ?

You cannot change this feature. It is there for ages.

IIRC, there exists an enhancement request to provide a pair of
separate attributes, for exists and not exists checks. I think those
can be named "if" and "unless", but you should keep the old name as
well for compatibility. Patches are welcome.

Also note that if I understand correctly the current Tomcat 7 does not
support more than 1 access log valve per scope (context, host, ...).
Nobody complained about this yet though.

Best regards,
Konstantin Kolinko

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