Welcome! Log In Create A New Profile

Advanced

[nginx] svn commit: r4540 - trunk/src/http/modules

Anonymous User
March 15, 2012 03:38PM
Author: ru
Date: 2012-03-15 19:37:32 +0000 (Thu, 15 Mar 2012)
New Revision: 4540

Log:
- New variable: $connection_requests.
- While here, fixed format specifier for $connection.


Modified:
trunk/src/http/modules/ngx_http_log_module.c

Modified: trunk/src/http/modules/ngx_http_log_module.c
===================================================================
--- trunk/src/http/modules/ngx_http_log_module.c 2012-03-15 17:43:54 UTC (rev 4539)
+++ trunk/src/http/modules/ngx_http_log_module.c 2012-03-15 19:37:32 UTC (rev 4540)
@@ -80,6 +80,8 @@

static u_char *ngx_http_log_connection(ngx_http_request_t *r, u_char *buf,
ngx_http_log_op_t *op);
+static u_char *ngx_http_log_connection_requests(ngx_http_request_t *r,
+ u_char *buf, ngx_http_log_op_t *op);
static u_char *ngx_http_log_pipe(ngx_http_request_t *r, u_char *buf,
ngx_http_log_op_t *op);
static u_char *ngx_http_log_time(ngx_http_request_t *r, u_char *buf,
@@ -193,6 +195,8 @@

static ngx_http_log_var_t ngx_http_log_vars[] = {
{ ngx_string("connection"), NGX_ATOMIC_T_LEN, ngx_http_log_connection },
+ { ngx_string("connection_requests"), NGX_INT_T_LEN,
+ ngx_http_log_connection_requests },
{ ngx_string("pipe"), 1, ngx_http_log_pipe },
{ ngx_string("time_local"), sizeof("28/Sep/1970:12:00:00 +0600") - 1,
ngx_http_log_time },
@@ -501,11 +505,19 @@
ngx_http_log_connection(ngx_http_request_t *r, u_char *buf,
ngx_http_log_op_t *op)
{
- return ngx_sprintf(buf, "%ui", r->connection->number);
+ return ngx_sprintf(buf, "%uA", r->connection->number);
}


static u_char *
+ngx_http_log_connection_requests(ngx_http_request_t *r, u_char *buf,
+ ngx_http_log_op_t *op)
+{
+ return ngx_sprintf(buf, "%ui", r->connection->requests);
+}
+
+
+static u_char *
ngx_http_log_pipe(ngx_http_request_t *r, u_char *buf, ngx_http_log_op_t *op)
{
if (r->pipeline) {

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[nginx] svn commit: r4540 - trunk/src/http/modules

Anonymous User 1303 March 15, 2012 03:38PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 305
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready