i must setup conditional logging for demands done over apaches mod_proxy. is the fact that possible and when just how?

i already checked the documentation but didn't find something that i possibly could use for setenvif

i request here and this is not on serverfault because there's a company application logic behind (traffic calcluations for customers...)

also i observed that that proxy usernames within the log file.

proxy.2x.to:80 62.178.15.161 - peidel [06/Jun/2011:01:31:44 +0200] "GET http://proxy.2x.to/ HTTP/1.1" 200 1339 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:2.0.1) Gecko/20100101 Firefox/4.0.1" 

this really is line from /var/log/apache2/other_vhosts_access.log that is produced through the default log defnitions:

LogFormat "%v:%p %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
CustomLog /var/log/apache2/other_vhosts_access.log vhost_combined

peidel may be the username.

within the documentation it states:

%l Remote logname (from identd, if provided). This can return a dash unless of course mod_ident exists and IdentityCheck is placed On.

now my question about this: can one depend on that? or is it feasible that somebody produces request with this particular identity information but who isn't authenticated and produces log lines by having an identity anyway?

http://httpd.apache.org/docs/current/logs.html

This is actually the userid of the individual asking for the document as determined by HTTP authentication. Exactly the same value is usually presented to CGI scripts within the REMOTE_USER atmosphere variable. When the status code for that request (see below) is 401, than the value shouldn't be reliable because the consumer is not authenticated. If the document isn't password protected, this part is going to be "-" just such as the previous one.