xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Ian Campbell <ian.campbell@citrix.com>
To: ian.jackson@eu.citrix.com, xen-devel@lists.xen.org
Cc: Ian Campbell <ian.campbell@citrix.com>
Subject: [PATCH OSSTEST] standalone: do not rotate empty log files.
Date: Wed, 7 Oct 2015 09:25:45 +0100	[thread overview]
Message-ID: <1444206345-21659-1-git-send-email-ian.campbell@citrix.com> (raw)

By passing -n to savelog.

In particular this prevents the creation of an empty $log.0 on first
use when $log doesn't exist.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
 standalone | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/standalone b/standalone
index 27e2e7d..d9c927f 100755
--- a/standalone
+++ b/standalone
@@ -192,7 +192,7 @@ ensure_logs() {
 with_logging() {
     local log=$1; shift
     ensure_logs
-    savelog -c 300 "$log" >/dev/null
+    savelog -c -n 300 "$log" >/dev/null
     "$@" 2>&1 | tee "$log"
     rc=${PIPESTATUS[0]}
     if [ $rc -ne 0 ] ; then
-- 
2.5.3

             reply	other threads:[~2015-10-07  8:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-07  8:25 Ian Campbell [this message]
2015-10-07  9:57 ` [PATCH OSSTEST] standalone: do not rotate empty log files Ian Jackson
2015-10-07 14:54   ` Ian Campbell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1444206345-21659-1-git-send-email-ian.campbell@citrix.com \
    --to=ian.campbell@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).