[lxc-devel] [PATCH] lxc-checkpoint should actually log things

Tycho Andersen tycho.andersen at canonical.com
Thu Sep 18 14:43:08 UTC 2014


Looks like lxc-checkpoint was missing the log inititalization code, so it never
actually logged anything when the options were provided.

Signed-off-by: Tycho Andersen <tycho.andersen at canonical.com>
---
 src/lxc/lxc_checkpoint.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/src/lxc/lxc_checkpoint.c b/src/lxc/lxc_checkpoint.c
index 8dc2c17..698e434 100644
--- a/src/lxc/lxc_checkpoint.c
+++ b/src/lxc/lxc_checkpoint.c
@@ -174,6 +174,15 @@ int main(int argc, char *argv[])
 	if (lxc_arguments_parse(&my_args, argc, argv))
 		exit(1);
 
+	if (!my_args.log_file)
+		my_args.log_file = "none";
+
+	if (lxc_log_init(my_args.name, my_args.log_file, my_args.log_priority,
+			 my_args.progname, my_args.quiet, my_args.lxcpath[0]))
+		exit(1);
+
+	lxc_log_options_no_override();
+
 	c = lxc_container_new(my_args.name, my_args.lxcpath[0]);
 	if (!c) {
 		fprintf(stderr, "System error loading %s\n", my_args.name);
-- 
1.9.1



More information about the lxc-devel mailing list