You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Rich Bowen <rb...@rcbowen.com> on 2011/09/18 04:56:01 UTC

Documentation clarification: ErrorLogFormat

In the documentation for the ErrorLogFormat directive, log format strings are given as, for example, %...A

What does the ... signify?

It's not clear to me either from the doc (which doesn't mention it) or the source what that's supposed to signify.

Thanks for any light anyone can shed on this for me.

--
Rich Bowen
rbowen@rcbowen.com
rbowen@apache.org







Re: Documentation clarification: ErrorLogFormat

Posted by Stefan Fritsch <sf...@sfritsch.de>.
On Sunday 18 September 2011, Rich Bowen wrote:
> On Sep 17, 2011, at 10:56 PM, Rich Bowen wrote:
> > In the documentation for the ErrorLogFormat directive, log format
> > strings are given as, for example, %...A
> > 
> > What does the ... signify?
> > 
> > It's not clear to me either from the doc (which doesn't mention
> > it) or the source what that's supposed to signify.
> 
> My apologies. It *is* mentioned in the documentation. It's where
> the modifier (-, +, or a number 1-15 signifying the log level)
> goes. I'll add some examples in there so that people, like myself,
> who can't read, don't overlook it. :)

If you think the ... are confusing, feel free to remove them. Or add 
an explanation sentence to the table. The "default format" example has 
some modifiers. Maybe it should be moved before the paragraph 
describing the modifiers?

Re: Documentation clarification: ErrorLogFormat

Posted by Rich Bowen <rb...@rcbowen.com>.
On Sep 17, 2011, at 10:56 PM, Rich Bowen wrote:

> In the documentation for the ErrorLogFormat directive, log format strings are given as, for example, %...A
> 
> What does the ... signify?
> 
> It's not clear to me either from the doc (which doesn't mention it) or the source what that's supposed to signify.

My apologies. It *is* mentioned in the documentation. It's where the modifier (-, +, or a number 1-15 signifying the log level) goes. I'll add some examples in there so that people, like myself, who can't read, don't overlook it. :)


--
Rich Bowen
rbowen@rcbowen.com
rbowen@apache.org







Re: Documentation clarification: ErrorLogFormat

Posted by Rich Bowen <rb...@rcbowen.com>.
On Sep 19, 2011, at 2:17 PM, William A. Rowe Jr. wrote:

> On 9/17/2011 9:56 PM, Rich Bowen wrote:
>> In the documentation for the ErrorLogFormat directive, log format strings are given as, for example, %...A
>> 
>> What does the ... signify?
> 
> Modifiers
> 
> Particular items can be restricted to print only for responses with specific HTTP status
> codes by placing a comma-separated list of status codes immediately following the "%". For
> example, "%400,501{User-agent}i" logs User-agent on 400 errors and 501 errors only. For
> other status codes, the literal string "-" will be logged. The status code list may be
> preceded by a "!" to indicate negation: "%!200,304,302{Referer}i" logs Referer on all
> requests that do not return one of the three specified codes.
> 
> The modifiers "<" and ">" can be used for requests that have been internally redirected to
> choose whether the original or final (respectively) request should be consulted. By
> default, the % directives %s, %U, %T, %D, and %r look at the original request while all
> others look at the final request. So for example, %>s can be used to record the final
> status of the request and %<u can be used to record the original authenticated user on a
> request that is internally redirected to an unauthenticated resource.

That's LogFormat, not ErrorLogFormat. It's similar, but different, in ErrorLogFormat

In ErrorLogFormat, you can have '-', '+', or a number from 1 to 15.

--
Rich Bowen
rbowen@rcbowen.com
rbowen@apache.org







---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscribe@httpd.apache.org
For additional commands, e-mail: docs-help@httpd.apache.org


Re: Documentation clarification: ErrorLogFormat

Posted by "William A. Rowe Jr." <wr...@rowe-clan.net>.
On 9/17/2011 9:56 PM, Rich Bowen wrote:
> In the documentation for the ErrorLogFormat directive, log format strings are given as, for example, %...A
> 
> What does the ... signify?

Modifiers

Particular items can be restricted to print only for responses with specific HTTP status
codes by placing a comma-separated list of status codes immediately following the "%". For
example, "%400,501{User-agent}i" logs User-agent on 400 errors and 501 errors only. For
other status codes, the literal string "-" will be logged. The status code list may be
preceded by a "!" to indicate negation: "%!200,304,302{Referer}i" logs Referer on all
requests that do not return one of the three specified codes.

The modifiers "<" and ">" can be used for requests that have been internally redirected to
choose whether the original or final (respectively) request should be consulted. By
default, the % directives %s, %U, %T, %D, and %r look at the original request while all
others look at the final request. So for example, %>s can be used to record the final
status of the request and %<u can be used to record the original authenticated user on a
request that is internally redirected to an unauthenticated resource.


---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscribe@httpd.apache.org
For additional commands, e-mail: docs-help@httpd.apache.org


Re: Documentation clarification: ErrorLogFormat

Posted by Rich Bowen <rb...@rcbowen.com>.
On Sep 17, 2011, at 10:56 PM, Rich Bowen wrote:

> In the documentation for the ErrorLogFormat directive, log format strings are given as, for example, %...A
> 
> What does the ... signify?
> 
> It's not clear to me either from the doc (which doesn't mention it) or the source what that's supposed to signify.

My apologies. It *is* mentioned in the documentation. It's where the modifier (-, +, or a number 1-15 signifying the log level) goes. I'll add some examples in there so that people, like myself, who can't read, don't overlook it. :)


--
Rich Bowen
rbowen@rcbowen.com
rbowen@apache.org







---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscribe@httpd.apache.org
For additional commands, e-mail: docs-help@httpd.apache.org