httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nick Gearls <nickgea...@gmail.com>
Subject Re: mod_substitute debugging
Date Tue, 30 May 2017 07:00:49 GMT
Hi Ruediger,

I understood that.
My main question was "Which code do I include and release version and 
which one do I keep only for a debug build?"
I have no problem to have everything included with a run-time check, I 
was just wondering if someone will not complain that this adds too much 
things.

I'll prepare a patch to have everything included at run-time, we'll see 
the feedback.

Thanks for your time

On 24-05-2017 16:17, Ruediger Pluem wrote:
>
> On 05/24/2017 03:56 PM, Nick Gearls wrote:
>> I added some debugging features in mod_substitute, damned useful when trying to troubleshoot
things.
>> I'll propose a patch but I'd like your advise about when to log debug info:
>>
>> I added the following info:
>> 1. line to be parsed, type or search (regex/string), replace string
>> 2. in case of matching, the new value
>>
>> All logging of debugging info is in level TRACE8
>>
>> Remark: the matching string/regex is compiled, so it's not available at run-time.
>> I added this info in the subst_pattern_t struct - with a #ifdef _DEBUG to not waste
memory in release mode
>>
>> My main question is: do I leave all logging in release mode (TRACE8 level) or do
I also make this logging dependent on
>> the compile flag?
> Neither :-).
>
> Have a look at the
>
> APLOG_*_IS_LEVEL macros in http_log.h and wrap the code that creates effort accordingly.
> If the effort is just a simple ap_log_?error line then you need to nothing if compiled
with a c99 compiler. See the
> ap_log_* macro magic in http_log.h
>
> Regards
>
> RĂ¼diger
>


Mime
View raw message