httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Fritsch ...@sfritsch.de>
Subject Re: Proposal: error codes
Date Sun, 27 Nov 2011 17:14:17 GMT
On Sunday 27 November 2011, Rich Bowen wrote:
> At Apachecon several of us were discussing how error messages could
> be made more helpful without making them paragraphs. Two
> suggestions were made - adding a URL to the message or adding a
> number/code to each error that would then be looked up for more
> information.
> 
> Any thoughts on 1) the wisdom of this and 2) the method of
> assigning codes?
> 
> I've long considered error messages to be documentation and would
> live to see the log files be one step more helpful.

Yes, that would be a good idea and I agree with Daniel that we should 
use a distinct prefix or format. We currently have around 2700 calls 
to *_log_?error in trunk, so a 4-digit number should be ok. Together 
with for example AH as prefix for "Apache HTTPD" this would result in 
numbers like AH0815 which don't seem to cause many hits on google.

As a first step, one could simply manually add the error code to the 
format strings of those messages that frequently appear in support 
requests. This would be non-disruptive for 2.4 and could even be done 
in some future 2.2.x version, if someone is willing to do the work.

I would keep the scheme for assigning codes simple. Just have a file 
that contains the next usable one and always increment the number in 
that file when a code is assigned to an error message.

We could then have some scripts to check that no error code is used 
twice and maybe create a list of error message and module for each 
error code.

If somebody later comes up with something more refined (e.g. pass the 
error code as additional parameter to ap_log_error), it should be 
straightforward enough to switch.

Cheers,
Stefan

Mime
View raw message