This repository has been archived by the owner on Jun 30, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 164
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
access-log API finalization / cleanups and overhauls
- the request-logging API has changed in order to closer match other APIs The following variable definitions are treated as special in the format while all other characters are treated as-is. $ua - the user-agent $path - the requested path $rhost - the IP address of the request $meth - the HTTP method $ts - timestamp $proto - HTTP proto version $status - the return status $ref - the HTTP referrer $host - either the vhost (if defined) or the value of the Host: header evhtp_log_new("<format>"); This function logs a request using the compiled format above to a FILE evhtp_log_request_f(fmt, request, FILE); - Moved debug logging functions into internal.h and removed log.h - Moved request logging into include/evhtp/log.h and src/log.c - Removed assert.h and moved functions into internal.h - Updated CmakeLists to reflect various changes and add more checks.
- Loading branch information
1 parent
ec75536
commit 5f74f32
Showing
18 changed files
with
443 additions
and
493 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,6 @@ | |
*/ | ||
|
||
#include <evhtp/config.h> | ||
#include <evhtp/assert.h> | ||
|
||
#ifndef __EVHTP__H__ | ||
#define __EVHTP__H__ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#ifndef __EVHTP_LOG_H__ | ||
#define __EVHTP_LOG_H__ | ||
|
||
|
||
/** | ||
* @brief create a new request-logging context with the format string `format` | ||
* @note The following variable definitions are treated as special in the | ||
* format: | ||
* $ua - the user-agent | ||
* $path - the requested path | ||
* $rhost - the IP address of the request | ||
* $meth - the HTTP method | ||
* $ts - timestamp | ||
* $proto - HTTP proto version | ||
* $status - the return status | ||
* $ref - the HTTP referrer | ||
* $host - either the vhost (if defined) or the value of the Host: header | ||
* All other characters are treated as-is. | ||
* | ||
* @param format - format string (see above) | ||
*/ | ||
EVHTP_EXPORT void * evhtp_log_new(const char * format); | ||
|
||
|
||
/** | ||
* @brief log a HTTP request to a FILE using a compiled format. | ||
* | ||
* @param log - The compiled format (see evhtp_log_new) | ||
* @param request | ||
* @param fp | ||
*/ | ||
EVHTP_EXPORT void evhtp_log_request_f(void * log, evhtp_request_t * request, FILE * fp); | ||
|
||
#endif | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.