FAQ

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

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 9 of 11 | next ›
Discussion Overview
groupusers @
categoriesapache
postedJan 27, '10 at 5:35p
activeJan 29, '10 at 7:45p
posts11
users5
websitehttpd.apache.org
irc#httpd

People

Translate

site design / logo © 2022 Grokbase