httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Hammerman <jhammer...@videoegg.com>
Subject RE: [users@httpd] Re: mod_log_config issue
Date Thu, 28 Jan 2010 20:44:22 GMT
Justin - the wrapper script (in its original form) that I provided in my previous email has
been tested in this manner against sample data.

You are correct  about my sed syntax - I have replaced those commands with s/antelope// in
the formats provided below, and verified that there is no output.

Editing the scripts referenced below so that they also replace antelope with nothing also
results in no output.

Any other thoughts?

-----Original Message-----
From: Justin Pasher [mailto:justinp@newmediagateway.com] 
Sent: Thursday, January 28, 2010 12:18 PM
To: users@httpd.apache.org
Subject: Re: [users@httpd] Re: mod_log_config issue

Joe Hammerman wrote:
> Hi Dan,
>
> When the sed command is replaced with /bin/cat, logs are generated. Using a sed command
that does nothing results in no log output; e.g.
>
> CustomLog "| /bin/sed s/// |/usr/bin/cronolog..."
> CustomLog "| /bin/sed 's///' | /usr/bin/cronolog..."
> CustomLog "| /bin/sed -e 's///' | /usr/bin/cronolog..."
>   

I haven't really been following this thread in detail, but here are some 
thing I noticed.

All three of the sed commands above are invalid, so it doesn't surprise 
me there is no output.

$ echo "test" | sed s///
sed: -e expression #1, char 0: no previous regular expression
$ echo "test" | sed 's///'
sed: -e expression #1, char 0: no previous regular expression
$ echo "test" | sed -e 's///'
sed: -e expression #1, char 0: no previous regular expression

Since replacing it with cat works, it means the sed command in your 
original code is not working as expected. Try logging directly to a 
file, then run your sed commands or wrapper script on that file (e.g. 
cat this.log > sed -e 's/blah/blah/'). Once you have verified that is 
working properly, then come back to putting it into the apache config.

There is also a chance that the escape sequences for a shell are 
different than those for the apache directive. You can verify that by 
starting out with a much simpler sed script, then expanding from there.

-- 
Justin Pasher

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message