]> git.proxmox.com Git - mirror_lxc.git/commitdiff
lxc-checkpoint should actually log things
authorTycho Andersen <tycho.andersen@canonical.com>
Thu, 18 Sep 2014 14:43:08 +0000 (09:43 -0500)
committerStéphane Graber <stgraber@ubuntu.com>
Fri, 19 Sep 2014 21:20:08 +0000 (17:20 -0400)
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@canonical.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
src/lxc/lxc_checkpoint.c

index 8dc2c1792e1890dbad79e5eba9a16ea561514787..698e4342bd83de59ce03ff7a37cf00f3fbe62761 100644 (file)
@@ -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);