Return-Path: X-Original-To: apmail-httpd-cvs-archive@www.apache.org Delivered-To: apmail-httpd-cvs-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 655A01735C for ; Fri, 13 Mar 2015 12:15:41 +0000 (UTC) Received: (qmail 26899 invoked by uid 500); 13 Mar 2015 12:15:41 -0000 Delivered-To: apmail-httpd-cvs-archive@httpd.apache.org Received: (qmail 26842 invoked by uid 500); 13 Mar 2015 12:15:41 -0000 Mailing-List: contact cvs-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list cvs@httpd.apache.org Received: (qmail 26833 invoked by uid 99); 13 Mar 2015 12:15:41 -0000 Received: from eris.apache.org (HELO hades.apache.org) (140.211.11.105) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Mar 2015 12:15:41 +0000 Received: from hades.apache.org (localhost [127.0.0.1]) by hades.apache.org (ASF Mail Server at hades.apache.org) with ESMTP id 173B4AC0163 for ; Fri, 13 Mar 2015 12:15:41 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1666415 - /httpd/httpd/trunk/support/rotatelogs.c Date: Fri, 13 Mar 2015 12:15:40 -0000 To: cvs@httpd.apache.org From: rjung@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20150313121541.173B4AC0163@hades.apache.org> Author: rjung Date: Fri Mar 13 12:15:40 2015 New Revision: 1666415 URL: http://svn.apache.org/r1666415 Log: 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 Modified: httpd/httpd/trunk/support/rotatelogs.c Modified: httpd/httpd/trunk/support/rotatelogs.c URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/support/rotatelogs.c?rev=1666415&r1=1666414&r2=1666415&view=diff ============================================================================== --- httpd/httpd/trunk/support/rotatelogs.c (original) +++ httpd/httpd/trunk/support/rotatelogs.c Fri Mar 13 12:15:40 2015 @@ -149,8 +149,9 @@ static void usage(const char *argv0, con #if APR_FILES_AS_SOCKETS " -c Create log even if it is empty.\n" #endif + " -n num Rotate file by adding suffixes '.0', '.1', ..., '.(num-1)'.\n" "\n" - "The program is invoked as \"[prog] []\"\n" + "The program for '-p' is invoked as \"[prog] []\"\n" "where is the filename of the newly opened logfile, and\n" ", if given, is the filename of the previously used logfile.\n" "\n"); @@ -213,7 +214,7 @@ static void dumpConfig (rotate_config_t 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 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) {