The new function ap_recent_ctime_ex allows for
optional formatting hints. It checks the provided buffer
length and returns the number of consumed bytes. This is necessary,
because when using options, the length of the formatted time string
is no longer constant.
The only option implemented currently is the addition of microsecond
fractions to the timestamp.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@952203 13f79535-47bb-0310-9956-ffa450edef68
- Add macro wrappers for ap_log_*error. On C99, this will save argument
preparation and function call overhead when a message is not logged
because of the configured loglevel.
- Introduce per-module loglevel configuration.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@951893 13f79535-47bb-0310-9956-ffa450edef68
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
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
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
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
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
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
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
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
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
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
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