Jim Jagielski
55701bdc09
We really need some place where we can place a whole
...
bunch of data/info-that-should-be-logged-by-all-mpms.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1599601 13f79535-47bb-0310-9956-ffa450edef68
2014-06-03 15:22:37 +00:00
Jeff Trawick
ebfa4e231d
Follow-up to r1512819:
...
Don't include "\" in the printable form of the data because
it will be escaped later in processing, and the extra escaping
throws off the alignment. Just filter it out like unprintable
characters.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1565777 13f79535-47bb-0310-9956-ffa450edef68
2014-02-07 19:54:06 +00:00
Jeff Trawick
d26fb3d0d9
Follow-up to r1539988:
...
Make sure an error log provider has initialized before trying to log to it.
(A log function may be called in a window between closing stderr and opening logs.)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1543979 13f79535-47bb-0310-9956-ffa450edef68
2013-11-20 22:54:37 +00:00
Jan Kaluža
75525b82e5
Do not lose log messages with NULL server_rec when error log provider is used.
...
- set stderr_log to NULL after it is redirected to /dev/null
- use log provider of ap_server_conf in log_error_core when no server_rec
is provided and std_err_log is NULL
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1539988 13f79535-47bb-0310-9956-ffa450edef68
2013-11-08 11:41:08 +00:00
Jeff Trawick
a8fbe8c2f0
don't ignore some apr_procattr failures (clang scan-build)
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1534995 13f79535-47bb-0310-9956-ffa450edef68
2013-10-23 11:59:35 +00:00
Jeff Trawick
86014a1423
Follow-up to r1525597:
...
Initialize error log providers in vhosts, solving crashes
when logging from those vhosts as well as allowing a different
provider (or provider configuration) for vhosts.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1532344 13f79535-47bb-0310-9956-ffa450edef68
2013-10-15 14:09:29 +00:00
Jeff Trawick
4073515aa5
avoid needless apr_pstrdup()
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1532122 13f79535-47bb-0310-9956-ffa450edef68
2013-10-14 22:51:44 +00:00
Jeff Trawick
86b710bb80
Fix the null device name on Windows so that stderr can be sent
...
to the bit bucket. (This logic is always hit when using an error
log provider.)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1527008 13f79535-47bb-0310-9956-ffa450edef68
2013-09-27 18:01:15 +00:00
Jeff Trawick
f89aa5c2a2
When adding APR_EOL_STR in the error log record before calling
...
the writer, include that trailer in the length.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1527005 13f79535-47bb-0310-9956-ffa450edef68
2013-09-27 17:55:00 +00:00
Jeff Trawick
528855d544
Error log providers need to be able to trigger a startup error from their
...
init() function. A NULL return code is the trigger.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1527003 13f79535-47bb-0310-9956-ffa450edef68
2013-09-27 17:52:13 +00:00
Jeff Trawick
6a062fcc84
Suppress formatting of startup messages written to the console when
...
ErrorLogFormat is used.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1525931 13f79535-47bb-0310-9956-ffa450edef68
2013-09-24 15:57:07 +00:00
Jan Kaluža
904b3f8d8b
Add AP_ERRORLOG_PROVIDER_ADD_EOL_STR flag for ap_errorlog_provider, bump MMN.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1525845 13f79535-47bb-0310-9956-ffa450edef68
2013-09-24 11:03:55 +00:00
Jeff Trawick
84d106dec4
allow the provider to decide whether or not APLOG_NOTICE
...
messages should be logged
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1525664 13f79535-47bb-0310-9956-ffa450edef68
2013-09-23 18:15:32 +00:00
Jan Kaluža
59bb55791e
Add ap_errorlog_provider to make ErrorLog logging modular. Move
...
syslog support from core to new mod_syslog.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1525597 13f79535-47bb-0310-9956-ffa450edef68
2013-09-23 14:02:27 +00:00
Jeff Trawick
0d02cd5c6d
Add ap_log_data(), ap_log_rdata(), etc. for logging buffers.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1512819 13f79535-47bb-0310-9956-ffa450edef68
2013-08-10 19:50:58 +00:00
Stefan Fritsch
a68ec08398
use ap_log_error's facility to print the apr error string instead of
...
calling apr_strerror() explicitly
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1463052 13f79535-47bb-0310-9956-ffa450edef68
2013-03-31 21:12:00 +00:00
Jeff Trawick
9429e7b6cd
only write the first len chars to syslog, as the buffer may have additional
...
text added speculatively
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1399708 13f79535-47bb-0310-9956-ffa450edef68
2012-10-18 15:55:46 +00:00
Jeff Trawick
f4eac06dc5
style tweak
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1399687 13f79535-47bb-0310-9956-ffa450edef68
2012-10-18 15:02:24 +00:00
Stefan Fritsch
5a3782a9fe
Add a few AP_DEBUG_ASSERT()s for the benefit of clang
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1384913 13f79535-47bb-0310-9956-ffa450edef68
2012-09-14 20:44:01 +00:00
Jeff Trawick
b6f86b92c2
The Pidfile directive and ap_log_pid()/ap_remove_pid()/ap_read_pid()
...
now respect DefaultRuntimeDir
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1369808 13f79535-47bb-0310-9956-ffa450edef68
2012-08-06 12:15:03 +00:00
Stefan Fritsch
07d44a6c44
Fix segfault in logging if r->useragent_addr or c->client_addr is unset
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1328950 13f79535-47bb-0310-9956-ffa450edef68
2012-04-22 19:41:59 +00:00
Graham Leggett
cb21a0dbcc
Further clarify the naming of the entity that directly connects to us by
...
calling that entity a client instead of a peer.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1214015 13f79535-47bb-0310-9956-ffa450edef68
2011-12-14 01:10:52 +00:00
Graham Leggett
ad489c105b
Further clarify the naming of the entity that originates the request by
...
calling that entity a useragent instead of a client.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1214005 13f79535-47bb-0310-9956-ffa450edef68
2011-12-14 00:33:46 +00:00
Stefan Fritsch
92e366007c
Add lots of unique tags to error log messages
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1209766 13f79535-47bb-0310-9956-ffa450edef68
2011-12-02 23:02:04 +00:00
Graham Leggett
394e5594d6
Introduce a per connection "peer_ip" and a per request "client_ip" to
...
distinguish between the raw IP address of the connection and the effective
IP address of the request.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1206291 13f79535-47bb-0310-9956-ffa450edef68
2011-11-25 19:42:04 +00:00
Graham Leggett
d98a314d98
Align the format variable for the raw IP between the error_log and the
...
access_log.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1205061 13f79535-47bb-0310-9956-ffa450edef68
2011-11-22 16:16:51 +00:00
Graham Leggett
4ee7eea4cf
Introduce a per request version of the remote IP address, which can be
...
optionally modified by a module when the effective IP of the client
is not the same as the real IP of the client (such as a load balancer).
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1204968 13f79535-47bb-0310-9956-ffa450edef68
2011-11-22 13:10:39 +00:00
Stefan Fritsch
e0184da329
Pass ap_errorlog_info to error_log hook.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1204614 13f79535-47bb-0310-9956-ffa450edef68
2011-11-21 17:36:26 +00:00
Stefan Fritsch
add3418303
Fix logic when to call error_log hook
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1204595 13f79535-47bb-0310-9956-ffa450edef68
2011-11-21 17:01:10 +00:00
Jeff Trawick
7cc67a8c39
add conn_rec to error log hook
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1203634 13f79535-47bb-0310-9956-ffa450edef68
2011-11-18 13:10:06 +00:00
Stefan Fritsch
4a69a843de
Fix per-request / per-conn logging, probably broken by r1041140
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1199591 13f79535-47bb-0310-9956-ffa450edef68
2011-11-09 01:36:19 +00:00
Jim Jagielski
427c85bd23
Cleanup effort in prep for GA push:
...
Trim trailing whitespace... no func change
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1174751 13f79535-47bb-0310-9956-ffa450edef68
2011-09-23 13:39:32 +00:00
Stefan Fritsch
07b7057cb1
Fix logging of the log id of subrequests
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1142160 13f79535-47bb-0310-9956-ffa450edef68
2011-07-02 06:45:54 +00:00
Stefan Fritsch
bde65f90cb
Add support to ErrorLogFormat for logging the system unique
...
thread id under Linux
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1138616 13f79535-47bb-0310-9956-ffa450edef68
2011-06-22 20:22:24 +00:00
Stefan Fritsch
c9fd2623da
Introduce ap_(get|set)_core_module_config() functions/macros and use them
...
everywhere.
We know that the core module has module_index 0. Therefore we can save
some pointer operations in ap_get_module_config(cv, &core_module) and
ap_set_module_config(cv, &core_module, val). As these are called rather often,
this may actually have some (small) measurable effect.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1132781 13f79535-47bb-0310-9956-ffa450edef68
2011-06-06 21:26:56 +00:00
Jeff Trawick
86d7dd25c4
allow error log formatters to peek at the message format
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1101143 13f79535-47bb-0310-9956-ffa450edef68
2011-05-09 18:43:50 +00:00
Jeff Trawick
7be2d26631
consolidate logic to remove the pidfile in a new API,
...
ap_remove_pid(), related to existing ap_log_pid() and
ap_read_pid()
presumably this is useful to third-party MPMs as well
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1086224 13f79535-47bb-0310-9956-ffa450edef68
2011-03-28 13:35:08 +00:00
Stefan Fritsch
40f5690256
Check for s->module_config before using it, as the faked server_rec from
...
mod_cgid does not have it.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1060245 13f79535-47bb-0310-9956-ffa450edef68
2011-01-18 09:01:19 +00:00
Stefan Fritsch
efa98ce0f0
Fix warning about comparing signed/unsigned
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1041140 13f79535-47bb-0310-9956-ffa450edef68
2010-12-01 19:25:15 +00:00
Stefan Fritsch
286c8622b6
Add a generic pool cleanup function that sets a pointer to NULL and use
...
it to replace various pool cleanup functions.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1032167 13f79535-47bb-0310-9956-ffa450edef68
2010-11-06 22:12:41 +00:00
Guenter Knauf
2768a20d29
Added header include for getpid() prototype on Win32.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1025496 13f79535-47bb-0310-9956-ffa450edef68
2010-10-20 11:03:01 +00:00
Stefan Fritsch
39262df913
info.file, info.line, and info.status should not be defined for per-request or
...
per-conn info
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1021904 13f79535-47bb-0310-9956-ffa450edef68
2010-10-12 20:01:53 +00:00
Stefan Fritsch
2e4a59c5e1
add %v and %V to ErrorLogFormat
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1005208 13f79535-47bb-0310-9956-ffa450edef68
2010-10-06 19:14:44 +00:00
Stefan Fritsch
b65066c6ac
Add generate_log_id hook to allow to use the ID generated by mod_unique_id as
...
error log ID for requests.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1002125 13f79535-47bb-0310-9956-ffa450edef68
2010-09-28 11:53:17 +00:00
Stefan Fritsch
107c5573e1
In ErrorLogFormat, make it possible to log an item only if the loglevel
...
of the message is higher than a specified value. This allows to achive
the old behaviour for the source file name/line number of being only
logged for debug and higher.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1001381 13f79535-47bb-0310-9956-ffa450edef68
2010-09-26 07:40:15 +00:00
Stefan Fritsch
d0bc2d2cfb
add errorlog formats for request notes and env vars
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@996307 13f79535-47bb-0310-9956-ffa450edef68
2010-09-12 12:59:10 +00:00
Stefan Fritsch
fbeadc3cc4
readability fix, as suggested by Ruediger Pluem
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@995870 13f79535-47bb-0310-9956-ffa450edef68
2010-09-10 17:00:08 +00:00
Stefan Fritsch
3ad914e110
- Add another check during ErrorLogFormat parsing
...
- Simplify code (including Ruediger's suggestions)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@993120 13f79535-47bb-0310-9956-ffa450edef68
2010-09-06 18:53:38 +00:00
Stefan Fritsch
70be0f7a07
Add ErrorLogFormat directive for configuring the error log format, including
...
additional information that is logged once per connection or request.
Add error log IDs for connections and request to allow correlating error log
lines and the corresponding access log entry.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@992806 13f79535-47bb-0310-9956-ffa450edef68
2010-09-05 15:44:19 +00:00
Stefan Fritsch
6639073375
Change log_error_core to prefer s over c->base_server for loglevel
...
configuration.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@954976 13f79535-47bb-0310-9956-ffa450edef68
2010-06-15 17:32:36 +00:00