Commit b56d64e0 by Tycho Andersen Committed by Stéphane Graber

lxc-checkpoint should actually log things

Looks like lxc-checkpoint was missing the log inititalization code, so it never actually logged anything when the options were provided. Signed-off-by: 's avatarTycho Andersen <tycho.andersen@canonical.com> Acked-by: 's avatarStéphane Graber <stgraber@ubuntu.com>
parent d48d2229
...@@ -174,6 +174,15 @@ int main(int argc, char *argv[]) ...@@ -174,6 +174,15 @@ int main(int argc, char *argv[])
if (lxc_arguments_parse(&my_args, argc, argv)) if (lxc_arguments_parse(&my_args, argc, argv))
exit(1); 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]); c = lxc_container_new(my_args.name, my_args.lxcpath[0]);
if (!c) { if (!c) {
fprintf(stderr, "System error loading %s\n", my_args.name); fprintf(stderr, "System error loading %s\n", my_args.name);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment