You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Tianyin Xu <ti...@cs.ucsd.edu> on 2016/03/24 01:55:44 UTC
Questions on writing logging stmts in httpd
Hi folks,
I've a question regarding writing logging statements in httpd code. I
notice that most of the logging statements are associated with a log
number, defined by the APLOGNO macro, while some others (in the same
module) do not. I have the following questions when writing new logging
statements,
1. What are these log numbers used for? (I remember the early versions do
not have these...)
2. What kinds of logs need the log numbers and what do not?
3. How to determine the number when writing a new logging statement? Is
there any specific rule to generate the number? If not, how to avoid the
collision?
Thanks a lot!
Tianyin
Re: Questions on writing logging stmts in httpd
Posted by Luca Toscano <to...@gmail.com>.
Hi!
Don't have a lot of context but I found some answers in the httpd code (see
inline comments):
2016-03-24 2:07 GMT+01:00 Tianyin Xu <ti...@cs.ucsd.edu>:
> I find a previous post,
> http://marc.info/?t=140579318800001&r=1&w=2
>
> which helped answer the 2nd question, basically, "anything more important
> than DEBUG needs a number."
>
> but it does not answer the Question #1 and #3 :-|
>
> ~t
>
>
>
> On Wed, Mar 23, 2016 at 5:55 PM, Tianyin Xu <ti...@cs.ucsd.edu> wrote:
>
>> Hi folks,
>>
>> I've a question regarding writing logging statements in httpd code. I
>> notice that most of the logging statements are associated with a log
>> number, defined by the APLOGNO macro, while some others (in the same
>> module) do not. I have the following questions when writing new logging
>> statements,
>>
>> 1. What are these log numbers used for? (I remember the early versions do
>> not have these...)
>>
>
More info in
https://github.com/apache/httpd/blob/trunk/include/http_log.h#L111
>
>> 2. What kinds of logs need the log numbers and what do not?
>>
>> 3. How to determine the number when writing a new logging statement? Is
>> there any specific rule to generate the number? If not, how to avoid the
>> collision?
>>
>
More info in
https://github.com/apache/httpd/tree/trunk/docs/log-message-tags
Hope that helps!
Luca
Re: Questions on writing logging stmts in httpd
Posted by Tianyin Xu <ti...@cs.ucsd.edu>.
I find a previous post,
http://marc.info/?t=140579318800001&r=1&w=2
which helped answer the 2nd question, basically, "anything more important
than DEBUG needs a number."
but it does not answer the Question #1 and #3 :-|
~t
On Wed, Mar 23, 2016 at 5:55 PM, Tianyin Xu <ti...@cs.ucsd.edu> wrote:
> Hi folks,
>
> I've a question regarding writing logging statements in httpd code. I
> notice that most of the logging statements are associated with a log
> number, defined by the APLOGNO macro, while some others (in the same
> module) do not. I have the following questions when writing new logging
> statements,
>
> 1. What are these log numbers used for? (I remember the early versions do
> not have these...)
>
> 2. What kinds of logs need the log numbers and what do not?
>
> 3. How to determine the number when writing a new logging statement? Is
> there any specific rule to generate the number? If not, how to avoid the
> collision?
>
> Thanks a lot!
> Tianyin
>
>