httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [Bug 53981] New: move def of log_request_state from mod_log_request.c to mod_log_request.h
Date Mon, 08 Oct 2012 18:04:49 GMT

          Priority: P2
            Bug ID: 53981
           Summary: move def of log_request_state from mod_log_request.c
                    to mod_log_request.h
          Severity: normal
    Classification: Unclassified
                OS: Linux
          Hardware: PC
            Status: NEW
           Version: 2.4.3
         Component: mod_log_config
           Product: Apache httpd-2

I'd like this:

 * log_request_state holds request specific log data that is not
 * part of the request_rec.
typedef struct {
    apr_time_t request_end_time;
} log_request_state;

moved from mod_log_config.c to mod_log_config.h.

The reason is that I have a custom module that registers log handler functions
with mod_log_config, and one of the custom handlers is a GMT version of
log_request_time. Currently, I make a copy of this typedef in my custom module.
However, my custom module already includes mod_log_config.h (needed to get the
definition for ap_register_log_handler), so I think this typedef should also go
there; in case the structure changes in a future version, I'd automatically get
the new definition.

A reason for my module to re-use the state variable used by mod_log_config,
instead of storing it's own module-specific state variable in the request_rec,
is in the case that you log the request end time in both localtime and gmtime,
you'd have the end time saved once, which prevents different seconds being
logged if the second log item happened to be after the clock ticked over to the
next second.

You are receiving this mail because:
You are the assignee for the bug.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message