Custom Logs With Web App Specific Information That Is NON Cookie NON Header Information?

Custom Logs With Web App Specific Information That Is NON Cookie NON Header Information?

Post by Scott Del » Thu, 14 Mar 2002 03:34:28



I have a quick question that any help in finding the answer would be
greatly appreciated.  I would like to be able to have my application
set specific information in an Apache Custom Log file.  Right now the
application is php driven.  Besides the standard apache type info with
page urls, execution time, etc. I'd like to be able to add entries for
things like category, site area, etc. that can't easily be determined
just from the url.  It looks like I could use the {Cookie} and
{Header} options.  However, that seems like a hack since I do not need
to actually send this information back to the client as a header or a
cookie.  I also imagine I might have problems with custom headers
going through firewalls.  I have looked at the {Note} function but
this seems to only work between modules and not down at the CGI level.
 If I need to submitt more information please let me know.

Thanks.
Scott Delap

 
 
 

Custom Logs With Web App Specific Information That Is NON Cookie NON Header Information?

Post by Joshua Sliv » Thu, 14 Mar 2002 03:45:39



> I have a quick question that any help in finding the answer would be
> greatly appreciated.  I would like to be able to have my application
> set specific information in an Apache Custom Log file.  Right now the
> application is php driven.  Besides the standard apache type info with
> page urls, execution time, etc. I'd like to be able to add entries for
> things like category, site area, etc. that can't easily be determined
> just from the url.  It looks like I could use the {Cookie} and
> {Header} options.  However, that seems like a hack since I do not need
> to actually send this information back to the client as a header or a
> cookie.  I also imagine I might have problems with custom headers
> going through firewalls.  I have looked at the {Note} function but
> this seems to only work between modules and not down at the CGI level.
>  If I need to submitt more information please let me know.

If you are really using the CGI interface for PHP, then I think your
only option is sticking stuff in the response headers and using
%{X-custom-header}o.  On the other hand, if you are using PHP as an
apache module, then taking a quick look at the PHP manual, you will
also find http://www.php.net/manual/en/function.apache-note.php which
allows you to set apache Notes and
http://www.php.net/manual/en/function.apache-setenv.php which allows
you to set env variables.  Either of these can be logged.

--
Joshua Slive

Apache HTTP Server Users Mailing List: http://httpd.apache.org/userslist.html

 
 
 

1. Can you log specific cookies with Apache %{cookie}i log format?

Hi

Just wanted to know if it is possible to limit the returned \"%{cookie}i \"
string in our custom logfile to only show the "Apache=" cookie rather than
all the cookies set for the current servers domain. We are comparing the
\"%{set-cookie}o\" server response to the browser set-cookie request to
identify browsers who have turned off cookies. Logging other cookies not set
directly by Apache seems a waste of disk space. Is there an alternative
other than fiddling with the mod_log_config code?

Any clues much appreciated.

Rob.

2. Puzzling Lilo problem with backup and restore via tarball on CD-R

3. how to kill specific app processes by non-root app-admin

4. VHDL software recommendation

5. customizing cookie information in Apache logs

6. Samba fax spooler?!

7. non-intrusive mod to read custom HTTP header

8. File system space disappearing!

9. Apache Web Server: Hiding information in the headers

10. patchadd fails on non-global non-sparse non-running zones

11. Shared, non shared libraries need some information about this subject

12. Ground Rules for a Non-Monopolistic Information Technology Market

13. : Calling Non-Curses Apps from Curses App ?