RE: [PATCH] EventLog display name patch
At 03:04 PM 6/18/2003, Juan Rivera wrote: >Is there any other way to get the display name? I look for other ways but couldn't >figure out another approach. From the registry. It just looks like we look up the display name a little too late for some classes of errors. Working on this. Bill
RE: [PATCH] EventLog display name patch
Title: RE: [PATCH] EventLog display name patch Is there any other way to get the display name? I look for other ways but couldn't figure out another approach. Juan -Original Message- From: William A. Rowe, Jr. [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 18, 2003 3:43 PM To: [EMAIL PROTECTED] Subject: Re: [PATCH] EventLog display name patch At 09:59 AM 6/18/2003, Juan Rivera wrote: >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. > >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. This part of the patch isn't acceptable because; >The service command like would be: > >Apache2.exe -k runservice -n "web server 1" this requirement above breaks exiting installed services, which is not good, IMHO. >This is important because the display_name variable will set when the service is executed. This variable is used by the nt_eventlog.c I believe we can go a little further to assure that is filled in or retrieved as soon as it is needed. Let me look for the underlying bug. >The nt_eventlog.c patch replaces the hard-coded registry path SYSTEM\\CurrentControlSet\\Services\\EventLog\\Application\\Apache Service > >with > >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. You must also register the event provider, which I will verify in your patch or code up if it's missing before I commit. I was originally hesitant to waste the additional space to create event loggers for each copy of Apache. You've sold me, and I understand your concern about trying to review an event log of many active instances of Apache. Most of my httpd time has been stuck in ssl issues, I hope now to dig out and get back to your patch and port the Win98/ME support from 1.3 as well. Thanks for all of your efforts, Juan! Bill
Re: [PATCH] EventLog display name patch
At 09:59 AM 6/18/2003, Juan Rivera wrote: >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. > >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. This part of the patch isn't acceptable because; >The service command like would be: > >Apache2.exe -k runservice -n "web server 1" this requirement above breaks exiting installed services, which is not good, IMHO. >This is important because the display_name variable will set when the service is >executed. This variable is used by the nt_eventlog.c I believe we can go a little further to assure that is filled in or retrieved as soon as it is needed. Let me look for the underlying bug. >The nt_eventlog.c patch replaces the hard-coded registry path >SYSTEM\\CurrentControlSet\\Services\\EventLog\\Application\\Apache Service > >with > >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. You must also register the event provider, which I will verify in your patch or code up if it's missing before I commit. I was originally hesitant to waste the additional space to create event loggers for each copy of Apache. You've sold me, and I understand your concern about trying to review an event log of many active instances of Apache. Most of my httpd time has been stuck in ssl issues, I hope now to dig out and get back to your patch and port the Win98/ME support from 1.3 as well. Thanks for all of your efforts, Juan! Bill
RE: [PATCH] EventLog display name patch
Title: [PATCH] EventLog display name patch 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 [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 18, 2003 10:59 AM To: [EMAIL PROTECTED] 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 with 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. Juan
[PATCH] EventLog display name patch
Title: [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 with 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. Juan service.c.path Description: Binary data nt_eventlog.c.patch Description: Binary data