Re: Questions on writing logging stmts in httpd

2016-03-24 Thread Luca Toscano
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 :

> I find a previous post,
> http://marc.info/?t=14057931881=1=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  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

2016-03-23 Thread Tianyin Xu
I find a previous post,
http://marc.info/?t=14057931881=1=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  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
>
>


Questions on writing logging stmts in httpd

2016-03-23 Thread Tianyin Xu
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