]> git.ipfire.org Git - thirdparty/apache/httpd.git/commit
Add an option to autocreate directories to rotatelogs.
authorBen Reser <breser@apache.org>
Sat, 19 Oct 2013 19:10:33 +0000 (19:10 +0000)
committerBen Reser <breser@apache.org>
Sat, 19 Oct 2013 19:10:33 +0000 (19:10 +0000)
commit1c1f9e12a2c6c643cf8edded47427870ca3ca672
tree89314c4bbe26bfb22c6ca3021915576284625c3f
parentff972f05123d0ad5cd96a0333854a0934d3db51e
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)

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1533810 13f79535-47bb-0310-9956-ffa450edef68
docs/man/rotatelogs.8
docs/manual/programs/rotatelogs.html.en
support/rotatelogs.c