Hi,

I have updated my patch to the latest trunk and to use the variant
where the module for logging is selected with APLOG_USE_MODULE and
AP_DECLARE_MODULE macros:

    APLOG_USE_MODULE(foo)

expands to

    extern module AP_MODULE_DECLARE_DATA foo_module;
    static int * const aplog_module_index = &(foo_module.module_index)

and 

    AP_DECLARE_MODULE(foo)

expands to

    APLOG_USE_MODULE(foo);
    module AP_MODULE_DECLARE_DATA foo_module

So, a single-file module only needs to do:

    AP_DECLARE_MODULE(foo) =
    {
            STANDARD20_MODULE_STUFF,
        ...

Multi-file modules have to use APLOG_USE_MODULE in the other
files.

The patch is at

        http://people.apache.org/~sf/per-module-loglevel-v4/ ,

both as one file and as a series split into more or less logical
chunks. Comments are very welcome. Also, it would be nice if
someone could try it with a different compiler than gcc.

Do you think the APLOG_USE_MODULE/AP_DECLARE_MODULE macros are
better than having to define AP_MODULE_VAR in every file?

And what do you think about commiting that to trunk before Jim
tags the next alpha?

Cheers,
Stefan

Reply via email to