[lxc-devel] [lxc/master] tools/lxc_snapshot: removed internal logging
AustinReichert on Github
lxc-bot at linuxcontainers.org
Wed Nov 29 00:02:22 UTC 2017
A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 361 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20171129/dc3e003f/attachment.bin>
-------------- next part --------------
From 8457116379378d5e86be01c631d405f758971950 Mon Sep 17 00:00:00 2001
From: AustinReichert <austinskyreichert at utexas.edu>
Date: Tue, 28 Nov 2017 17:07:24 -0600
Subject: [PATCH] tools/lxc_snapshot: removed internal logging
Signed-off-by: AustinReichert <austinskyreichert at utexas.edu>
---
src/lxc/tools/lxc_snapshot.c | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/src/lxc/tools/lxc_snapshot.c b/src/lxc/tools/lxc_snapshot.c
index 0a97961e7..0c0ea3ada 100644
--- a/src/lxc/tools/lxc_snapshot.c
+++ b/src/lxc/tools/lxc_snapshot.c
@@ -33,8 +33,6 @@
#include "storage.h"
#include "utils.h"
-lxc_log_define(lxc_snapshot_ui, lxc);
-
static int my_parser(struct lxc_arguments *args, int c, char *arg);
static const struct option my_longopts[] = {
@@ -208,12 +206,10 @@ static int do_snapshot(struct lxc_container *c, char *commentfile)
ret = c->snapshot(c, commentfile);
if (ret < 0) {
- ERROR("Error creating a snapshot");
+ fprintf(stderr, "Error creating a snapshot\n");
return -1;
}
- INFO("Created snapshot snap%d", ret);
-
return 0;
}
@@ -227,7 +223,7 @@ static int do_snapshot_destroy(struct lxc_container *c, char *snapname)
ret = c->snapshot_destroy(c, snapname);
if (!ret) {
- ERROR("Error destroying snapshot %s", snapname);
+ fprintf(stderr, "Error destroying snapshot %s\n", snapname);
return -1;
}
@@ -241,7 +237,7 @@ static int do_snapshot_list(struct lxc_container *c, int print_comments)
n = c->snapshot_list(c, &s);
if (n < 0) {
- ERROR("Error listing snapshots");
+ fprintf(stderr, "Error listing snapshots\n");
return -1;
}
if (n == 0) {
@@ -281,7 +277,7 @@ static int do_snapshot_restore(struct lxc_container *c,
bret = c->snapshot_restore(c, args->snapname, args->newname);
if (!bret) {
- ERROR("Error restoring snapshot %s", args->snapname);
+ fprintf(stderr, "Error restoring snapshot %s\n", args->snapname);
return -1;
}
More information about the lxc-devel
mailing list