summaryrefslogtreecommitdiffstats
path: root/server/log.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Improve ap_log_cerror:Stefan Fritsch2010-03-101-2/+7
| | | | | | | | | - Log remote port - If the connection seems to be a back-end connection, log 'remote' instead of 'client' git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@921346 13f79535-47bb-0310-9956-ffa450edef68
* Use APR_PID_T_FMT instead of %ld and a cast.Graham Leggett2010-02-161-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@910747 13f79535-47bb-0310-9956-ffa450edef68
* Log command line on startup, so there's a record of command lineDaniel Earl Poirier2010-02-161-0/+27
| | | | | | | | arguments like -f. Suggested by Shaya Potter. [Dan Poirier] PR: 48752 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@910684 13f79535-47bb-0310-9956-ffa450edef68
* Print directive name in error message.Stefan Fritsch2010-02-051-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@907012 13f79535-47bb-0310-9956-ffa450edef68
* replace duplicate code with new function ap_parse_log_level()Stefan Fritsch2010-02-021-0/+19
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@905454 13f79535-47bb-0310-9956-ffa450edef68
* Fix string constness to get rid of gcc compiler warnings by -Wwrite-strings.Takashi Sato2009-12-291-2/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@894368 13f79535-47bb-0310-9956-ffa450edef68
* fix or complain about some invalid errno referencesJeff Trawick2009-11-191-0/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@882269 13f79535-47bb-0310-9956-ffa450edef68
* * server/log.c: Update comment in piped_log structure, now it is Joe Orton2009-09-161-2/+0
| | | | | | | has been made opaque. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@815811 13f79535-47bb-0310-9956-ffa450edef68
* Force the current directory to the server root in the invocation of the pipedWilliam A. Rowe Jr2009-05-151-0/+4
| | | | | | | | | | | | | logger processes. Looking for confirmation from Rainer that this resolves the ambiguity he observed in Message-ID: <4A0C9430.2090404@kippdata.de>. Note that the shell may decide to ignore the chdir, so test with "|$cmd" syntax to compare to the expected behavior from 5/14 or earlier. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@775327 13f79535-47bb-0310-9956-ffa450edef68
* Ease migration for the hosts of piped loggers out there, handle theWilliam A. Rowe Jr2009-05-151-1/+15
| | | | | | | log process selection (| vs $ vs default) in ap_open_piped_log git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@775320 13f79535-47bb-0310-9956-ffa450edef68
* Revert the default resource abuse introduced in r104019, which can maskWilliam A. Rowe Jr2009-05-151-10/+37
| | | | | | | | | | | | | | | child logger process failures, by migrating back to 2.0.49 and prior when rotated logs were reliable on Solaris, etc. Provides two new piped syntaxes for ErrorLog; "||program" or "|$shellcmd", where the existing 2.2 behavior may be preserved or the new 2.4 behavior explicitly elected. The default should discourage users from "|$" syntax except as required, in the future. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@775300 13f79535-47bb-0310-9956-ffa450edef68
* Make the piped_log structure opaque:Joe Orton2009-05-151-14/+45
| | | | | | | | | | | | | | | * include/http_log.h: Remove piped_log structure definition here; (ap_piped_log_read_fd, ap_piped_log_write_fd): Turn macros into functions. * server/log.c: Move piped_log structure definition here; replace fds[2] with read_fd, write_fd. (ap_piped_log_read_fd, ap_piped_log_write_fd): New functions. (throughout...): Replace use of ap_piped_log_write_fd, ap_piped_log_read_fd, with direct reference to structure fields. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@775120 13f79535-47bb-0310-9956-ffa450edef68
* Revert r774755: ap_server_root_relative() forRainer Jung2009-05-141-10/+2
| | | | | | | | | | | | | | | piped loggers is nonsense. It doesn't work when the logger path contains whitespace. We already allow relative paths because we open the log program via the shell. Code was taken from mod_rewrite and mod_log_forensic, which need to be still fixed (removing ap_server_root_relative() should suffice). git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@774884 13f79535-47bb-0310-9956-ffa450edef68
* Allow relative pathnames for piped loggers in ErrorLog.Rainer Jung2009-05-141-2/+10
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@774755 13f79535-47bb-0310-9956-ffa450edef68
* Add name of program to spawn to the errorRainer Jung2009-05-141-2/+4
| | | | | | | message, when starting piped loggers fails. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@774730 13f79535-47bb-0310-9956-ffa450edef68
* Whitespace cleanup. No functional change.Rainer Jung2009-05-141-3/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@774728 13f79535-47bb-0310-9956-ffa450edef68
* Revert r735516 as requested by wrowe.Rainer Jung2009-05-141-82/+24
| | | | | | | | | Will commit again as smaller patches, also merging piped_log_wrapper with the piped_log structure. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@774725 13f79535-47bb-0310-9956-ffa450edef68
* remove TPF supportJeff Trawick2009-03-271-16/+0
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@758936 13f79535-47bb-0310-9956-ffa450edef68
* * We need to return an int not a pointer!Ruediger Pluem2009-01-201-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@736110 13f79535-47bb-0310-9956-ffa450edef68
* Piped error loggers should use the reliable pipes,Rainer Jung2009-01-181-24/+82
| | | | | | | | | | | | | | | | | | i.e. they should be automatically restarted when they die similar to what happens for access loggers. Patch makes error loggers use the same code path as access loggers. Side effect: patch adds ap_server_root_relative() to the error logger path before spawning. Reviewed by R. Pluem. Patch needs to be tested on Windows. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@735516 13f79535-47bb-0310-9956-ffa450edef68
* The error logging core only logs at very high level if it has no Sander Temme2008-08-151-0/+2
| | | | | | | | | | | | | server_rec from which to read the appropriate LogLevel. Ensure that everything gets logged when -DDEBUG is passed to the compiler. This makes the server very verbose, on the command line before stderr is redirected and in the error log afterwards. This is appropriate when debugging, but not under normal circumstances. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@686271 13f79535-47bb-0310-9956-ffa450edef68
* Remove all references to CORE_PRIVATE.Paul Querna2008-04-071-2/+0
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@645455 13f79535-47bb-0310-9956-ffa450edef68
* On win32, we must never, never close the parent's copy of theWilliam A. Rowe Jr2007-12-311-1/+12
| | | | | | | | | | child's read end for a reliable piped logger. The child runs and manages it's own logs, and even if the parent did instead, the mpm would be adjusted to pass down the child write ends without read ends to the pipes, so this forever makes no sense. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@607666 13f79535-47bb-0310-9956-ffa450edef68
* We now have an API to describe pipe creation timeout states, so use itWilliam A. Rowe Jr2007-10-241-2/+3
| | | | | | | to ensure no platform has quirks with their particular default. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@587670 13f79535-47bb-0310-9956-ffa450edef68
* Share a single write-pipe handle for piped stderr logging, thisWilliam A. Rowe Jr2007-09-281-0/+10
| | | | | | | | | prevents an extra logging process from hanging around after the initial config-phase. Reviewed by: rpluem, wrowe git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@580437 13f79535-47bb-0310-9956-ffa450edef68
* redux, use Rudgier's instead, better comments.William A. Rowe Jr2007-09-281-6/+0
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@580436 13f79535-47bb-0310-9956-ffa450edef68
* Logging fixes, round two. Authored and Reviewed by both rplume and wroweWilliam A. Rowe Jr2007-09-281-0/+6
| | | | | | | | | within the same 10 minutes, this is the obvious fix to prevent any lingering write handles from hanging around in unexpected ways. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@580431 13f79535-47bb-0310-9956-ffa450edef68
* Introduce a specific pool for stderr logging, so that we have two William A. Rowe Jr2007-08-241-5/+55
| | | | | | | | | | simultanious pools until the new stderr pipe logger is completely initialized. This ensures we have a stderr channel from the time we clear the plog in a previous generation through the invocation of the open_logs hook in the next generation. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@569535 13f79535-47bb-0310-9956-ffa450edef68
* Refactor r452431, because this should not be fatal to startingWilliam A. Rowe Jr2007-08-221-13/+8
| | | | | | | | | | | | | the server if it's horribly broken. The alternative of returing 'rc' in this case would be to open /dev/null as the error stream for this generation of the server; and even more useless result. Also the parent-file was never necessary; we can pass only the child handle using apr_procattr_child_err_set() and have no extra file to clean up afterwards. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@568326 13f79535-47bb-0310-9956-ffa450edef68
* This message was confusing during debugging, make it unique.William A. Rowe Jr2007-08-221-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@568322 13f79535-47bb-0310-9956-ffa450edef68
* * server/log.c (ap_open_logs): When dup2'ing the error log to stderr,Joe Orton2006-10-241-8/+6
| | | | | | | | | | use the already-open stderr file object rather than opening a new one. Submitted by: Tom Donovan <Tom.Donovan acm.org> PR: 40476 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@467338 13f79535-47bb-0310-9956-ffa450edef68
* When starting a new piped error logger for the main server, ensureJoe Orton2006-10-031-8/+31
| | | | | | | | | | | | | | | | | that the new child's stderr is not a pipe to an old piped logger: * server/log.c (log_child): Add "dummy_stderr" parameter; if set, duplicate stdout as the stderr for the child. (open_error_log): Add "is_main" parameter; use dummy stderr for logger for main server only. (ap_open_logs, ap_open_piped_log): Adjust for new open_error_log()/ log_child() parameters. PR: 40651 Submitted by: jorton, rpluem git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@452431 13f79535-47bb-0310-9956-ffa450edef68
* update license header textRoy T. Fielding2006-07-111-6/+6
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@420983 13f79535-47bb-0310-9956-ffa450edef68
* Update the copyright year in all .c, .h and .xml filesColm MacCarthaigh2006-04-191-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@395228 13f79535-47bb-0310-9956-ffa450edef68
* No functional Change: Removing trailing whitespace. This alsoJim Jagielski2005-11-101-5/+5
| | | | | | | | means that "blank" lines consisting of just spaces or tabs are now really blank lines git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@332306 13f79535-47bb-0310-9956-ffa450edef68
* fix minor annoyance on z/OS: __FILE__ is set toJeff Trawick2005-05-251-1/+1
| | | | | | | | | "./foo.c" instead of simply "foo.c", so filter out all but the basename before logging it with debug messages git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@178299 13f79535-47bb-0310-9956-ffa450edef68
* * server/log.c (piped_log_spawn): Don't leak an fd for eachJoe Orton2005-05-181-1/+5
| | | | | | | | | invocation. Reviewed by: Jeff Trawick git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@170719 13f79535-47bb-0310-9956-ffa450edef68
* * server/log.c (ap_open_piped_log): Remove errno handling.Joe Orton2005-05-171-2/+0
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@170537 13f79535-47bb-0310-9956-ffa450edef68
* * server/log.c (piped_log_spawn): Return the APR error code,Joe Orton2005-05-161-6/+4
| | | | | | | | | as expected by piped_log_maintenance (and fixing "Unknown error" messages in error path there). (ap_open_piped_log): Expect an APR error code. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@170441 13f79535-47bb-0310-9956-ffa450edef68
* Prevent hangs of child processes when writing to piped loggers atJeff Trawick2005-05-161-0/+45
| | | | | | | | | | | the time of graceful restart. PR: 26467 Reviewed by: Joe Orton git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@170281 13f79535-47bb-0310-9956-ffa450edef68
* Update copyright year to 2005 and standardize on current copyright owner line.Justin Erenkrantz2005-02-041-1/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@151408 13f79535-47bb-0310-9956-ffa450edef68
* add ap_log_cerror(); use it in a couple of places in core output filterJeff Trawick2004-10-291-5/+23
| | | | | | | so that the client IP address is recorded in the log git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105625 13f79535-47bb-0310-9956-ffa450edef68
* * server/log.c (log_error_core): For APLOG_DEBUG on Unix, if __FILE__Joe Orton2004-09-221-1/+8
| | | | | | | is an absolute path (as in a VPATH build), just log the basename. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105258 13f79535-47bb-0310-9956-ffa450edef68
* tweak error handling when reading the pid fileJeff Trawick2004-08-141-3/+2
| | | | | | | | | | | | | | | previously strtol() would look at unitialized storage, but now the string is terminated where the data read ends give user a hint about removing the file if we can't read/parse it properly (somehow I ended up with a truncated httpd.pid on my own system, leading to these tweaks) git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104651 13f79535-47bb-0310-9956-ffa450edef68
* * modules/ssl/ssl_engine_kernel.c (ssl_callback_SSLVerify_CRL),Joe Orton2004-08-111-3/+3
| | | | | | | | | | | | | * server/log.c (ap_log_pid), * server/mpm/prefork/prefork.c (accept_mutex_on, accept_mutex_off), * support/htdbm.c (htdbm_list): Fix some non-literal format strings (warnings from gcc -Wformat-security). PR: 30585 Submitted by: Ulf Harnhammar (SITIC), Joe Orton git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104548 13f79535-47bb-0310-9956-ffa450edef68
* start piped loggers via the shell, passing through the environment variablesJeff Trawick2004-06-231-2/+2
| | | | | | | | | in the httpd process this requires a new APR feature (APR_SHELLCMD_ENV), just added to apr 1.0-dev git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104019 13f79535-47bb-0310-9956-ffa450edef68
* fix typo in recent commitJeff Trawick2004-06-091-2/+2
| | | | | | | Submitted by: Jean-Jacques Clar git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@103874 13f79535-47bb-0310-9956-ffa450edef68
* Pass environment variables through to piped loggers, resolvingJeff Trawick2004-05-281-0/+4
| | | | | | | | | a regression since 1.3. Submitted by: Ken Coar, Jeff Trawick git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@103796 13f79535-47bb-0310-9956-ffa450edef68
* * modules/loggers/mod_log_config.c, server/log.c (open_error_log,Joe Orton2004-05-061-2/+2
| | | | | | | | | | ap_replace_stderr_log): Use APR_LARGEFILE when opening log files, to allow log files to exceed the 2Gb limit if necessary. PR: 13511 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@103627 13f79535-47bb-0310-9956-ffa450edef68
* fix name of The Apache Software FoundationAndré Malo2004-02-091-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102619 13f79535-47bb-0310-9956-ffa450edef68