]> granicus.if.org Git - apache/commitdiff
Merge r1666415, r1780308 from trunk:
authorJim Jagielski <jim@apache.org>
Mon, 9 Apr 2018 15:34:20 +0000 (15:34 +0000)
committerJim Jagielski <jim@apache.org>
Mon, 9 Apr 2018 15:34:20 +0000 (15:34 +0000)
Small changes to rotatelogs:
- add "-n num" to help text
- clarify in help text, that "program is invoked"
  is the "-p" case
- prevent crash with "-v" (verbose) if no
  "-p prog" is used
- add one space for formatting

rotatelogs: fix -n help text

this closes #24

Submitted By: Isaac Boukris <iboukris gmail.com>

Submitted by: rjung, covener
Reviewed by: rjung, ylavic, niq, jim

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1828736 13f79535-47bb-0310-9956-ffa450edef68

STATUS
support/rotatelogs.c

diff --git a/STATUS b/STATUS
index 45af76910f26106c7ad536c79a66c448d717cfb8..ac221544dfc719496d2fb44b2feda96315c9f7f2 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -148,21 +148,6 @@ PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
      +1: rjung, ylavic, niq
      jung: I'll wait a bit whether the below remaining rotatelogs patch makes it to apply in order.
 
-  *) rotatelogs: Small changes to rotatelogs:
-     - add "-n num" to help text
-     - clarify in help text, that "program is invoked"
-       is the "-p" case
-     - prevent crash with "-v" (verbose) if no
-       "-p prog" is used
-     - add one space for formatting
-     plus: fix -n help text
-     this closes #24
-     trunk patches: http://svn.apache.org/r1666415
-                    http://svn.apache.org/r1780308
-     2.4.x patch: svn merge -c 1666415,1780308 ^/httpd/httpd/trunk .
-     +1: rjung, covener, ylavic
-     jung: I'll wait a bit whether the below remaining rotatelogs patch makes it to apply in order.
-
   *) rotatelogs: Choose "-D" instead of "-d" for the rotatelogs
      option that creates the path to the log file.
      I want to use "-d" for another directory related
index b03b7dad6d54d8dd8fb5486db29cd2bd485b9ba0..75cf587055ec0df0735a3231e8f78c86e207f079 100644 (file)
@@ -149,8 +149,9 @@ static void usage(const char *argv0, const char *reason)
 #if APR_FILES_AS_SOCKETS
             "  -c       Create log even if it is empty.\n"
 #endif
+            "  -n num   Rotate file by adding suffixes '.1', '.2', ..., '.num'.\n"
             "\n"
-            "The program is invoked as \"[prog] <curfile> [<prevfile>]\"\n"
+            "The program for '-p' is invoked as \"[prog] <curfile> [<prevfile>]\"\n"
             "where <curfile> is the filename of the newly opened logfile, and\n"
             "<prevfile>, if given, is the filename of the previously used logfile.\n"
             "\n");
@@ -212,7 +213,7 @@ static void dumpConfig (rotate_config_t *config)
     fprintf(stderr, "Rotation create empty logs:  %12s\n", config->create_empty ? "yes" : "no");
 #endif
     fprintf(stderr, "Rotation file name: %21s\n", config->szLogRoot);
-    fprintf(stderr, "Post-rotation prog: %21s\n", config->postrotate_prog);
+    fprintf(stderr, "Post-rotation prog: %21s\n", config->postrotate_prog ? config->postrotate_prog : "not used");
 }
 
 /*
@@ -280,7 +281,7 @@ static void post_rotate(apr_pool_t *pool, struct logfile *newlog,
     if (config->linkfile) {
         apr_file_remove(config->linkfile, newlog->pool);
         if (config->verbose) {
-            fprintf(stderr,"Linking %s to %s\n", newlog->name, config->linkfile);
+            fprintf(stderr, "Linking %s to %s\n", newlog->name, config->linkfile);
         }
         rv = apr_file_link(newlog->name, config->linkfile);
         if (rv != APR_SUCCESS) {