FAQ
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
Sent: Thursday, January 28, 2010 12:18 PM
To: [email protected]
Subject: Re: [[email protected]] 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: [email protected]
" from the digest: [email protected]
For additional commands, e-mail: [email protected]


---------------------------------------------------------------------
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: [email protected]
" from the digest: [email protected]
For additional commands, e-mail: [email protected]

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 10 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 © 2023 Grokbase