You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Chris Sammis <cs...@cs.iastate.edu> on 2005/01/04 18:59:18 UTC

Apache2 (RedHat Enterprise) isn't logging using SetEnv VLOG

A week and a half ago we transitioned to a new web server running RedHat 
Enterprise 3 and Apache 2.0.46. We have a lot of vhosts, and they all 
want their own logs, so we used the SetEnv VLOG method of logging. 
However, that isn't working on the new server. VLOG log files aren't 
getting written. Here's what I've tried:

* Turning up the error level on the error log (which is working). It 
doesn't show anything out of the ordinary.
* Using a combined log file. The combined logfile writes properly, but 
that won't work for our setup.
* Checking directory permissions. Everything's okay, like I said the 
combined log file and error log files operate normally.
* Manually calling the split-logfile script and injecting a couple of 
made-up log lines. That works correctly too, the made-up lines are 
appended to the appropriate VLOG file.
* Putting some bad syntax into the split-logfile script and seeing what 
happens. The error log starts filling up with "script failed 
unexpectedly" messages, so apparently the server is calling the script.

Here's the relevant lines of httpd.conf. They're copied verbatim out of 
the old apache2.conf and placed at the end of the file so they aren't 
getting overriden by anything.

LogFormat "%V %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" 
\"%{User-Agent}i\" VLOG=%{VLOG}e" vhosts
SetEnv VLOG ""
CustomLog "|/usr/sbin/split-logfile" vhosts env=VLOG

All other CustomLog directives are commented out, and that's the only 
SetEnv VLOG directive present.
Anyone have any ideas for troubleshooting I haven't tried yet? Thanks.

-- 
Chris Sammis
On the Web: http://csammisrun.net
"Computer science is no more about computers than astronomy is about telescopes" -- E. J. Dijkstra


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


[users@httpd] Re: Apache2 (RedHat Enterprise) isn't logging using SetEnv VLOG

Posted by Joe Orton <jo...@redhat.com>.
On Tue, Jan 04, 2005 at 01:47:25PM -0500, Joshua Slive wrote:
> On Tue, 04 Jan 2005 12:23:16 -0600, Chris Sammis <cs...@cs.iastate.edu> wrote:
> > The LogFormat line adds the %V (virtual host) to a standard log line.
> > The CustomLog line pipes the logging output to a script, split-logfile,
> > which is detailed on the Apache support pages.
> > The VLOG env is set to the directory where the logs are supposed to go.
> > If it is left blank, the split-logfile script writes the logfiles to
> > /var/log/httpd.
> > 
> > >You are obviously using a redhat-modified version of apache, so you
> > >mayt have better luck asing in a redhat support forum.
> > >
> > Perhaps, but what could have been changed between a RH version and a
> > stock version that would affect piping log output to files?
> 
> The apache version does not use the VLOG env variable.  See:
> http://svn.apache.org/viewcvs.cgi/httpd/httpd/branches/2.0.x/support/split-logfile.in?rev=106449&view=markup
> So obviously your split-logfile script is modified.
> 
> Given that I have no idea what modifications were made, you should
> probably talk to redhat.

We don't ship a copy of the split-logfile script at all let alone a
modified one; Chris, I suggest you post a copy of the split-logfile
script you're using so we can see it.

joe

---------------------------------------------------------------------
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


Re: Apache2 (RedHat Enterprise) isn't logging using SetEnv VLOG

Posted by Joshua Slive <js...@gmail.com>.
On Tue, 04 Jan 2005 12:23:16 -0600, Chris Sammis <cs...@cs.iastate.edu> wrote:
> The LogFormat line adds the %V (virtual host) to a standard log line.
> The CustomLog line pipes the logging output to a script, split-logfile,
> which is detailed on the Apache support pages.
> The VLOG env is set to the directory where the logs are supposed to go.
> If it is left blank, the split-logfile script writes the logfiles to
> /var/log/httpd.
> 
> >You are obviously using a redhat-modified version of apache, so you
> >mayt have better luck asing in a redhat support forum.
> >
> Perhaps, but what could have been changed between a RH version and a
> stock version that would affect piping log output to files?

The apache version does not use the VLOG env variable.  See:
http://svn.apache.org/viewcvs.cgi/httpd/httpd/branches/2.0.x/support/split-logfile.in?rev=106449&view=markup
So obviously your split-logfile script is modified.

Given that I have no idea what modifications were made, you should
probably talk to redhat.

Joshua.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: Apache2 (RedHat Enterprise) isn't logging using SetEnv VLOG

Posted by Chris Sammis <cs...@cs.iastate.edu>.
Joshua Slive wrote:

>On Tue, 04 Jan 2005 11:59:18 -0600, Chris Sammis <cs...@cs.iastate.edu> wrote:
>  
>
>>A week and a half ago we transitioned to a new web server running RedHat
>>Enterprise 3 and Apache 2.0.46. We have a lot of vhosts, and they all
>>want their own logs, so we used the SetEnv VLOG method of logging.
>>However, that isn't working on the new server. VLOG log files aren't
>>getting written. Here's what I've tried:
>>    
>>
>
>  
>
>>LogFormat "%V %h %l %u %t \"%r\" %>s %b \"%{Referer}i\"
>>\"%{User-Agent}i\" VLOG=%{VLOG}e" vhosts
>>SetEnv VLOG ""
>>CustomLog "|/usr/sbin/split-logfile" vhosts env=VLOG
>>    
>>
>
>What *exactly* is this supposed to accomplish?  What is the VLOG env
>variable supposed to contain, and where does it get set?
>  
>
The LogFormat line adds the %V (virtual host) to a standard log line.
The CustomLog line pipes the logging output to a script, split-logfile, 
which is detailed on the Apache support pages.
The VLOG env is set to the directory where the logs are supposed to go. 
If it is left blank, the split-logfile script writes the logfiles to 
/var/log/httpd.

>You are obviously using a redhat-modified version of apache, so you
>mayt have better luck asing in a redhat support forum.
>  
>
Perhaps, but what could have been changed between a RH version and a 
stock version that would affect piping log output to files?

>Joshua.
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>For additional commands, e-mail: users-help@httpd.apache.org
>
>  
>

-- 
Chris Sammis
Mobile: 515-450-9553
On the Web: http://csammisrun.net
"Computer science is no more about computers than astronomy is about telescopes" -- E. J. Dijkstra


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: Apache2 (RedHat Enterprise) isn't logging using SetEnv VLOG

Posted by Joshua Slive <js...@gmail.com>.
On Tue, 04 Jan 2005 11:59:18 -0600, Chris Sammis <cs...@cs.iastate.edu> wrote:
> A week and a half ago we transitioned to a new web server running RedHat
> Enterprise 3 and Apache 2.0.46. We have a lot of vhosts, and they all
> want their own logs, so we used the SetEnv VLOG method of logging.
> However, that isn't working on the new server. VLOG log files aren't
> getting written. Here's what I've tried:

> 
> LogFormat "%V %h %l %u %t \"%r\" %>s %b \"%{Referer}i\"
> \"%{User-Agent}i\" VLOG=%{VLOG}e" vhosts
> SetEnv VLOG ""
> CustomLog "|/usr/sbin/split-logfile" vhosts env=VLOG

What *exactly* is this supposed to accomplish?  What is the VLOG env
variable supposed to contain, and where does it get set?

You are obviously using a redhat-modified version of apache, so you
mayt have better luck asing in a redhat support forum.

Joshua.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org