httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Juan Rivera <>
Subject RE: [PATCH] EventLog display name patch
Date Wed, 18 Jun 2003 15:03:06 GMT
BTW, the service.c patch should also take care of the following bug. If your
configuration file has a syntax error, you will get something like this in
your event log:
The Apache service named  reported the following error:
>>> Syntax error on line 32 of C:/Apache2/conf/httpd.conf:
What is missing is the actual service display name between the words named
and reported. With the service.c patch it will show it like this:
The Apache service named My Service Name reported the following error:
>>> Syntax error on line 32 of C:/Apache2/conf/httpd.conf:
-----Original Message-----
From: Juan Rivera [] 
Sent: Wednesday, June 18, 2003 10:59 AM
Subject: [PATCH] EventLog display name patch
The current nt_eventlog implementation has the hardcoded "Apache Service" as
the event log application name. This can be problematic if you have multiple
instances of Apache running on the same box.
If, for instance, you register multiple apache services using different
display names (-k install -n "My display name"), it is necessary that the
events in the event log map to the actual service that generated it, not
"Apache Service".
To fix this, I made midifications on two files: 
The service.c.patch simply adds the display name used during -k install into
the actual service command line. 
For example if you run 
Apache2.exe -k install -n "web server 1" 
The service command like would be: 
Apache2.exe -k runservice -n "web server 1" 
Instead of 
Apache2.exe -k runservice 
This is important because the display_name variable will set when the
service is executed. This variable is used by the nt_eventlog.c
The nt_eventlog.c patch replaces the hard-coded registry path
SYSTEM\\CurrentControlSet\\Services\\EventLog\\Application\\Apache Service
SYSTEM\\CurrentControlSet\\Services\\EventLog\\Application\\ + display_name 
Now your messages will be loged with the right application name. So you can
identify which service actually generated the error.

View raw message