Vladimir Homutov
493b898ae9
Added syslog support for error_log and access_log directives.
2014-05-12 16:34:15 +04:00
Sergey Kandaurov
7cf53e11f5
Access log: the "if" parameter of the "access_log" directive.
...
The parameter value specifies a condition under which the request is logged.
2014-04-15 21:32:56 +04:00
Maxim Dounin
5ab74625d6
Win32: $request_time fixed.
...
On win32, time_t is 64 bits wide by default, and passing an ngx_msec_int_t
argument for %T format specifier doesn't work. This doesn't manifest itself
on other platforms as time_t and ngx_msec_int_t are usually of the same size.
2013-09-04 20:48:30 +04:00
Maxim Dounin
e3cab76758
Backed out f1a91825730a and 7094bd12c1ff.
...
While ngx_get_full_name() might have a bit more descriptive arguments,
the ngx_conf_full_name() is generally easier to use when parsing
configuration and limits exposure of cycle->prefix / cycle->conf_prefix
details.
2013-08-20 21:11:19 +04:00
Valentin Bartenev
d29d21bade
Replaced ngx_conf_full_name() with ngx_get_full_name().
...
The ngx_get_full_name() function takes more readable arguments list.
2013-08-06 19:58:40 +04:00
Valentin Bartenev
70d1a45c7c
Access log: the "gzip" parameter of the "access_log" directive.
...
Note: this requires zlib version 1.2.0.4 or above to work.
2012-12-23 19:09:33 +00:00
Valentin Bartenev
fcdb4655aa
Access log: the "flush" parameter of the "access_log" directive.
2012-12-23 15:51:47 +00:00
Valentin Bartenev
a8ffed5751
Reopening log files code moved to a separate function.
...
The code refactored in a way to call custom handler that can do appropriate
cleanup work (if any), like flushing buffers, finishing compress streams,
finalizing connections to log daemon, etc..
2012-12-23 15:36:52 +00:00
Valentin Bartenev
df71cd1125
Access log: fixed redundant buffer reallocation.
...
Previously a new buffer was allocated for every "access_log" directive with the
same file path and "buffer=" parameters, while only one buffer per file is used.
2012-12-23 15:27:55 +00:00
Maxim Dounin
1e12e7fa1d
Variables $connection and $connection_requests.
...
Log module counterparts are removed as they aren't used often and
there is no need to preserve them for efficiency.
2012-10-29 17:17:59 +00:00
Maxim Dounin
a707811a31
Log: $apache_bytes_sent removed.
...
It was renamed to $body_bytes_sent in nginx 0.3.10 and the old name is
deprecated since then.
2012-10-03 15:25:06 +00:00
Ruslan Ermilov
1efcca36cc
Fixed compilation with -Wmissing-prototypes.
2012-07-24 15:09:54 +00:00
Andrey Belov
e91b210b56
New core variable: $status.
...
Contains response status code as a 3-digit integer
(with leading zeroes if necessary), or one of the following values:
000 - response status code has not yet been assigned
009 - HTTP/0.9 request is being processed
2012-06-18 13:43:44 +00:00
Ruslan Ermilov
1b4397443f
Zero padded the returned and logged HTTP status code, and fixed possible
...
buffer overrun in $status handling.
2012-05-16 13:27:04 +00:00
Ruslan Ermilov
06733ae8cf
- New variable: $connection_requests.
...
- While here, fixed format specifier for $connection.
2012-03-15 19:37:32 +00:00
Ruslan Ermilov
b74f8ffce4
Fixed spelling in single-line comments.
2012-02-28 11:31:05 +00:00
Valentin Bartenev
0e05ca0404
Disable symlinks: initialization of the "disable_symlinks" field in
...
ngx_open_file_info_t moved to a separate function.
This is preparation for the "from=" parameter implementation of the
"disable_symlinks" directive.
2012-02-27 16:51:28 +00:00
Andrey Belov
8ce8f6667f
Support for disable_symlinks in various modules.
2012-02-13 16:32:21 +00:00
Maxim Dounin
9f38b20db5
Time parsing cleanup.
...
Nuke NGX_PARSE_LARGE_TIME, it's not used since 0.6.30. The only error
ngx_parse_time() can currently return is NGX_ERROR, check it explicitly
and make sure to cast it to appropriate type (either time_t or ngx_msec_t)
to avoid signedness warnings on platforms with unsigned time_t (notably QNX).
2012-02-13 15:41:11 +00:00
Maxim Konovalov
f8d59e33f3
Copyright updated.
2012-01-18 15:07:43 +00:00
Ruslan Ermilov
59a2b77039
- Improved error message when parsing of the "buffer" parameter of the
...
"access_log" directive fails.
- Added a warning if "log_format" is used in contexts other than "http".
2011-12-06 21:07:10 +00:00
Maxim Dounin
e3d6c5a33c
Improved access log escaping to better protect other software.
...
Some character sets (notably ISO-8859-1) have C1 control characters in
upper half, make sure to escape them.
Reported by Jesus Olmos Gonzalez.
2011-10-11 17:54:38 +00:00
Ruslan Ermilov
a823c550e4
Replaced "can not" with "cannot" and "could not" in a bunch of places.
...
Fixed nearby grammar errors.
2011-09-19 14:48:29 +00:00
Igor Sysoev
c42be75569
removal of error message about %name log_format parameters,
...
they have been deleted long ago in 0.5.0-RELEASE
2011-08-03 16:01:36 +00:00
Igor Sysoev
c9d671cd81
$time_iso8601 log variable
...
patch by Michael Lustfield
2011-03-16 15:46:57 +00:00
Igor Sysoev
05b1a8f1e3
ngx_str_set() and ngx_str_null()
2010-05-14 09:56:37 +00:00
Igor Sysoev
328df7a5cc
use ngx_min() and ngx_max()
2010-05-14 09:55:33 +00:00
Igor Sysoev
f8b50b9c96
log proxied HTTP/0.9 responses status as "009"
2009-11-29 20:49:29 +00:00
Igor Sysoev
612ecb7674
optimize some cycles:
...
*) delete surplus variable;
*) on i386/amd64 "while (n) / n--" is smaller than "while (n--)",
because the platforms have no postfix operations
2009-11-02 17:12:09 +00:00
Igor Sysoev
e0f1d0afcc
style fix
2009-09-11 13:57:50 +00:00
Igor Sysoev
a79f8a5655
strict testing "access_log off"
2009-08-23 17:06:33 +00:00
Igor Sysoev
260c4321d7
return NULL instead of NGX_CONF_ERROR on a create conf failure
2009-06-02 16:09:44 +00:00
Igor Sysoev
f1cc457d7f
*) of.test_only to not open file if only stat() is enough
...
*) of.failed to return exact name of failed syscall
2009-04-27 09:55:53 +00:00
Igor Sysoev
1f4220ee86
small optimization: " == NGX_ERROR" > " != NGX_OK"
2009-02-24 10:42:23 +00:00
Igor Sysoev
ad1e123bfa
NGX_OPEN_FILE_DIRECTIO_OFF
2008-10-16 13:31:00 +00:00
Igor Sysoev
2eec1e1ff2
*) log_subrequest
...
*) flush variables in access log
2008-09-27 15:08:02 +00:00
Igor Sysoev
0f8ea4de46
disable directio for access_log with variables
2008-09-12 13:44:10 +00:00
Igor Sysoev
5d4e80b8fb
remove unused #include's
2008-09-05 15:25:47 +00:00
Igor Sysoev
edf1c8c1b8
always test root existence for access_log with variables
2008-07-07 09:26:13 +00:00
Igor Sysoev
06d2147139
NULL script in default access_log
2008-07-01 06:26:48 +00:00
Igor Sysoev
0da6d2f675
fix variable access_log merging
2008-06-30 15:51:28 +00:00
Igor Sysoev
504efffca8
fix error message
2008-06-30 15:32:57 +00:00
Igor Sysoev
b882154636
variables in access_log
2008-06-30 12:27:24 +00:00
Igor Sysoev
7f6b2ffc60
*) back out r2040
...
*) refactor ngx_palloc()
*) introduce ngx_pnalloc()
*) additional pool blocks have smaller header
2008-06-17 15:00:30 +00:00
Igor Sysoev
2ae6727da7
fix error log message
2008-05-26 10:54:59 +00:00
Igor Sysoev
5f3521cf4f
escape 0x00-0x1f, ", and \ in access log variables
2008-05-15 15:09:39 +00:00
Igor Sysoev
1d04b14c09
64-bit time_t compatibility
2007-11-15 14:26:36 +00:00
Igor Sysoev
3fc6ee4501
allow access_log inside limit_except
2007-10-09 18:45:49 +00:00
Igor Sysoev
28eafa574e
add comment
2007-07-06 11:28:20 +00:00
Igor Sysoev
b4ccb9f5bd
$request_time has millisecond precision
2007-04-21 07:50:19 +00:00