You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2012/10/08 20:04:49 UTC

[Bug 53981] New: move def of log_request_state from mod_log_request.c to mod_log_request.h

https://issues.apache.org/bugzilla/show_bug.cgi?id=53981

          Priority: P2
            Bug ID: 53981
          Assignee: bugs@httpd.apache.org
           Summary: move def of log_request_state from mod_log_request.c
                    to mod_log_request.h
          Severity: normal
    Classification: Unclassified
                OS: Linux
          Reporter: daniel.lescohier@cnet.com
          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: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 53981] move def of log_request_state from mod_log_config.c to mod_log_config.h

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53981

Daniel Lescohier <da...@cnet.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|move def of                 |move def of
                   |log_request_state from      |log_request_state from
                   |mod_log_request.c to        |mod_log_config.c to
                   |mod_log_request.h           |mod_log_config.h

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

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org