d729f64685f2d2056159c34ccdbb0423cd14cb36 1533810 |
|
19-Oct-2013 |
breser |
Add an option to autocreate directories to rotatelogs.
* support/rotatelogs.c
(rotate_config): Remove const from szLogRoot since we'll be passing it to
apr_filepath_merge. Add create_path member.
(usage, dumpConfig): Update to reflect new -d option.
(doRotate): Add code that knows how to create the directories a log file
is going to go into.
(main): Add the -d option and canonicalize the incoming path with
apr_filepath_merge() so that the code in doRotate can work properly.
* docs/man/rotatelogs.8,
docs/manual/programs/rotatelogs.html.en: Update for -d option.
PR: 46669
Submitted by: Philippe Lantin <plantin cobaltgroup.com>
(which was actually a patch written by myself when I worked there)
Tweaked by: breser (ported to trunk and changed option from -p to -d) |