[lxc-devel] [PATCH] lxc-checkpoint should actually log things
Serge Hallyn
serge.hallyn at ubuntu.com
Fri Sep 19 22:24:34 UTC 2014
Quoting Tycho Andersen (tycho.andersen at canonical.com):
> 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>
Acked-by: Serge E. Hallyn <serge.hallyn at ubuntu.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
>
> _______________________________________________
> lxc-devel mailing list
> lxc-devel at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-devel
More information about the lxc-devel
mailing list