httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ian Holsman" <li...@holsman.net>
Subject Re: mod_custom_log exits too late?
Date Sat, 14 Sep 2002 20:02:10 GMT
On Sat, 14 Sep 2002 05:26:25 -0700, William A. Rowe, Jr. wrote:

> The following patch changes the custom_log init phase to return an error
> from the config phase, rather than terminating abruptly.
> 
> It still doesn't seem right.  Why are we skipping log intialization on
> preflight?  I understand that the log pipe is expensive, but is there any
> reason not to run it at preflight and keep that pipe between restarts,
> just as we do now?
> 
> Since we don't try opening the output of CustomLog directives on
> preflight, -t won't warn that things are amis.

+1 for this change to make this release.
the reason is that it would require a magic # change (and we are already
doing one for .41, so we might want to avoid doing one for .42)

--Ian
> 
> BillIndex: modules/loggers/mod_log_config.c
> =================================================================== RCS
> file: /home/cvs/httpd-2.0/modules/loggers/mod_log_config.c,v retrieving
> revision 1.91
> diff -u -r1.91 mod_log_config.c
> --- modules/loggers/mod_log_config.c	6 Sep 2002 03:00:10 -0000	1.91 +++
> modules/loggers/mod_log_config.c	14 Sep 2002 17:22:49 -0000 @@ -1098,7
> +1098,7 @@
>      
>      cls->log_writer = log_writer_init(p, s, cls->fname); if
>      (cls->log_writer == NULL)
> -        exit(1);
> +        return NULL;
>  
>      return cls;
>  }
> @@ -1135,7 +1135,9 @@
>  		}
>  		}
>  	    }
> -            cls = open_config_log(s, p, cls, mls->default_format); +     
>       if (open_config_log(s, p, cls, mls->default_format)) +              
>  return (apr_pstrcat(p, "Failed to initialize custom log to ", +          
>                          cls->fname));
>          }
>          }
>      else if (mls->server_config_logs) {
> @@ -1150,7 +1152,9 @@
>  		}
>  		}
>  	    }
> -            cls = open_config_log(s, p, cls, mls->default_format); +     
>       if (open_config_log(s, p, cls, mls->default_format)) +              
>  return (apr_pstrcat(p, "Failed to initialize custom log to ", +          
>                          cls->fname));
>          }
>          }
>      }

Mime
View raw message