Received: (qmail 79651 invoked by uid 501); 23 Jan 2002 20:27:10 -0000 Message-Id: <20020123202710.79650.qmail@apache.org> Date: 23 Jan 2002 20:27:10 -0000 From: Juan Vera Reply-To: juan@corest.com To: submit@bugz.apache.org Subject: unexpected behaviour of CustomLog directive X-Send-Pr-Version: 3.110 >Number: 9574 >Category: mod_log-any >Synopsis: unexpected behaviour of CustomLog directive >Confidential: no >Severity: non-critical >Priority: medium >Responsible: apache >State: analyzed >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: apache >Arrival-Date: Wed Jan 23 12:30:00 PST 2002 >Closed-Date: >Last-Modified: Sat Jan 26 10:35:17 PST 2002 >Originator: juan@corest.com >Release: all? >Organization: >Environment: all >Description: When defining a customlog tag for use (on a global server or virtualhost) if you forget to define that tag, logs will be filled with the name of the tag and no warning is reported. >How-To-Repeat: change CustomLog on default httpd.conf for one like this #LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" user \ "%{SSL_CLIENT_S_DN_CN}x\"" combinedSSL (note the '#' on the line above) CustomLog /path/to/access_log combinedSSL restart apache and do some requests, logs will be filled with the string 'combinedSSL' and nothing else. >Fix: at least report 'warning: CustomLog for xxx virtualhost doesn't have a correspondant LogFormat entry', at best parse CustomLog for '%something' constructions, and try to validate its format. >Release-Note: >Audit-Trail: State-Changed-From-To: open-analyzed State-Changed-By: slive State-Changed-When: Sat Jan 26 10:35:17 PST 2002 State-Changed-Why: Your solution will not work because the CostumLog directive does not need to use a defined nickname. Instead, it can use an explicit logformat string. Since literal characters are allowed in a logformat string, apache is perfectly happy with the format string "ssl-format" or whatever. One solution might be to issue a warning if there is not at least one "%" directive in the format string. It is highly unlikely that anyone wants to have a log with only literals. >Unformatted: [In order for any reply to be added to the PR database, you need] [to include in the Cc line and make sure the] [subject line starts with the report component and number, with ] [or without any 'Re:' prefixes (such as "general/1098:" or ] ["Re: general/1098:"). If the subject doesn't match this ] [pattern, your message will be misfiled and ignored. The ] ["apbugs" address is not added to the Cc line of messages from ] [the database automatically because of the potential for mail ] [loops. If you do not include this Cc, your reply may be ig- ] [nored unless you are responding to an explicit request from a ] [developer. Reply only with text; DO NOT SEND ATTACHMENTS! ]