https://issues.apache.org/bugzilla/show_bug.cgi?id=51285
Bug #: 51285
Summary: [PATCH] rotatelogs: Add -p option to call arbitrary
post-rotate program
Product: Apache httpd-2
Version: 2.3-HEAD
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: support
AssignedTo: [email protected]
ReportedBy: [email protected]
Classification: Unclassified
rotatelogs: Add -p option to call arbitrary post-rotate program.
Post rotation, call the optional post-rotation program in a separate
thread. apr_proc_create() is called with cmdtype APR_PROGRAM, so it
has to be an executable file. Scripts are supported as long as the
shebang line uses a working interpreter.
The post-rotation program is run with equivalent arguments and
environment variables to let users choose:
argv[1]: Full path to current file
argv[2]: Full path to previous file
Env var ROTATELOGS_PATH_CUR: Full path to current file
Env var ROTATELOGS_PATH_PREV: Full path to previous file
Notes:
The original motivation for this was to have a flexible callback
to be able to maintain a current access.log symlink, and also
do event-based (vs cron-based) compression and archival/upload
to central systems.
Thread support is required and assumed. It's not clear to me how
important it would be to also support non-threaded systems. Adding
a fork-based solution (APR_HAS_THREADS) can be done rather quickly,
if needed.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]