Changeset f0c1fee64ea84cdbde9fadce76a39f50b94b2649

Show
Ignore:
Timestamp:
07/10/12 13:16:44 (2 years ago)
Author:
Theo Schlossnagle <jesus@omniti.com>
git-committer:
Theo Schlossnagle <jesus@omniti.com> 1341926204 -0400
git-parent:

[8222b0aec2811a66bae9e4f1c0ae5633173978ff]

git-author:
Theo Schlossnagle <jesus@omniti.com> 1341926204 -0400
Message:

Add HTTP request logging hook

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/noit_http.c

    r5a1bd35 rf0c1fee  
    4747#define HEADER_EXPECT "expect" 
    4848 
     49NOIT_HOOK_IMPL(http_request_log, 
     50  (noit_http_session_ctx *ctx), 
     51  void *, closure, 
     52  (void *closure, noit_http_session_ctx *ctx), 
     53  (closure,ctx)) 
     54 
    4955struct noit_http_connection { 
    5056  eventer_t e; 
     
    365371 
    366372  if(ctx->req.start_time.tv_sec == 0) return; 
     373  if(http_request_log_hook_invoke(ctx) != NOIT_HOOK_CONTINUE) return; 
     374 
    367375  gettimeofday(&end_time, NULL); 
    368376  now = end_time.tv_sec; 
  • src/noit_http.h

    ree04721 rf0c1fee  
    3939#include "utils/noit_hash.h" 
    4040#include "utils/noit_atomic.h" 
     41#include "utils/noit_hooks.h" 
    4142#include "noit_listener.h" 
    4243 
     
    194195  noit_http_init(); 
    195196 
     197NOIT_HOOK_PROTO(http_request_log, 
     198                (noit_http_session_ctx *ctx), 
     199                void *, closure, 
     200                (void *closure, noit_http_session_ctx *ctx)) 
     201 
    196202#endif